Reputation: 6121
I have an array of People I need to filter and order by against two criteria. My filter is simple in that if the name contains what they're typing let it through. For grouping, I want to group all of the people with clockedIn=1 first, and then within those two groups I want to order by last name.
My filter is working perfectly but I cannot seem to get orderBy to work at all no matter what I do...
Full jsfiddle: http://jsfiddle.net/joshuaohana/82k76uj0/1/, shows all helper functions and whatnot
The repeat I'm trying to setup:
<div ng-repeat="person in people | filter:nameFilterFn | orderBy: '+person.clockedIn' | orderBy:'-person.userLastName' ">
<p>{{person.userName}}</p>
<p>{{person.clockedIn}}</p>
</div>
For an ng-repeat, how do I...
Upvotes: 0
Views: 159