标签:
NG重复指令,带过滤器,像这样:
<li ng-repeat="item in items | orderBy:‘order_prop‘ | filter:query | limitTo:4"></li>
orderBy为key值,当然也可以为变量,在controller中可定义该变量值,如:
<li ng-repeat="item in items | orderBy:oreder | filter:query | limitTo:4"></li>
controller中:
$scope.order = ‘order_prop‘;
标签:
原文地址:http://www.cnblogs.com/lodingzone/p/5110751.html