I have an ng-repeat and I'm trying to get a specific order. I see that I can order using a list of properties:
ng-repeat="client in clients | orderBy: ['isOpen', 'lastAccessTime']"
My question is, how do I configure ascending and descending?
I want the primary sort on
isOpen with DESC, and secondary sort on
lastAccessTime with ASC. How can I achieve this in my
EDIT: I tried this below but, but when two items are both
isOpen, the highest
lastAccessTime is not on top:
ng-repeat="client in clients | orderBy: 'isOpen':true | orderBy: 'lastAccessTime'"
You can prefix the property name with a
- to indicate either ascending or descending order, as specified in the documentation for