Following on from a previous question on this topic (orderBy multiple fields in Angular), I'm wondering if it is possible to achieve this. Essentially, I want to orderBy multiple fields, but give priority to one of the fields if their value isn't null.
I'm using orderBy like so:
orderBy:['-sub','group']
From what I understand, the first item in the list of fields is given priority, but they are appearing at the bottom of the list.
Then you should do something like this
orderBy:['!-sub','group']"
Markup
Updated Fiddle