javascript - Angular js sort a list of items based on few conditions -


angular noob here

i have angular app in plunkr.

how sort list displayed here using angular such course flag stays on top , remaining items sorted alphabetically?

you can use orderby.

change ngrepeat this:

<a ng-repeat="prog in programs | orderby:'academic_program.program_title' | orderby:'primary_program':true" href="#" ng-click="display.addprogram = false" class="list-group-item"> 

here's modified plunker: http://plnkr.co/edit/pjbvf5myge3ggd2ufkkf?p=preview


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -