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
Post a Comment