[AngularJS] – How to filter and order by a collection?

The following is an example.

<li ng-repeat=“phone in $ctrl.phones | filter:$ctrl.query | orderBy:$ctrl.orderProp”> 

           <span>{{phone.name}}</span> <p>{{phone.snippet}}</p>



For more information: https://docs.angularjs.org/tutorial/step_06

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s