javascript - Combining 'orderBy' with another filter in Angular -
is there way order array output of filter? have expression this:
<li ng-repeat="sub in subscriptions"> {{sub | subscriptionoutput}} </li>
here subscriptions
array of objects, details of unimportant, , subscriptionoutput
custom filter.
now, order list (alphabetically) output of subscriptionoutput
filter. how can accomplish this? know can write function , sort that, i'm hoping there slicker way.
you can pipe filters together:
{{sub | subscriptionoutput | orderby:"somekey"}}
Comments
Post a Comment