angularjs - Order List Dividers Based on Custom OrderBy Function -
please see codepen below clarification. have situation need order list dividers based on "parentid" field in each kid of parent. have array of parentid's specified order parent items should appear in list. how might go this? if notice, losing original order of list dividers when using ng-repeat-start.
see codepen here
you need orderby:
<a class="item" ng-repeat="item in items | orderby:'parentid'"> {{item.description}} </a>
http://codepen.io/anon/pen/ltxfv
i messed parent id's on purpose, can see what's happening.
angularjs angularjs-ng-repeat ng-repeat ionic-framework
No comments:
Post a Comment