[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>

</li>

tutorial_06

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s