angular.js - angular ng-repeat sorts the values ​​from small to large by size
滿天的星座
滿天的星座 2017-05-15 17:08:14
0
1
826

Use ng-repeat to sequentially sort p according to the index value in the returnbanner from small to large. How to do it?

滿天的星座
滿天的星座

reply all(1)
我想大声告诉你

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>

Read more official documents...

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template