angular.js - angularjs中ng-repeat如何实现按年龄降序排序??
为情所困
为情所困 2017-05-15 17:11:33
0
1
610

ng-repeat如何实现按点赞数量降序排序,从大到小排序

为情所困
为情所困

reply all(1)
習慣沉默

You can add a filter condition to filter,
Ascending order:

<ul>

<li ng-repeat="user in users | orderBy:user.index">{{user.name}}</li>

</ul>
Reverse order:

<ul>

<li ng-repeat="user in users | orderBy:user.index:'desc'">{{user.name}}</li>

</ul>

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!