如何排序通过使用多个字段同时在有角?拳头按组,然后按子组
例如
例如
$scope.divisions = [{'group':1,'sub':1},{'group':2,'sub':10},{'group':1,'sub':2},'sub':20},'sub':11}];
我想显示为
组:子组
1〜1
1〜2
1〜20
2-1
2〜10
2-11
<select ng-model="divs" ng-options="(d.group+' - '+d.sub) for d in divisions | orderBy:'group' | orderBy:'sub'" />
请看这里:
原文链接:https://www.f2er.com/angularjs/148061.htmlhttp://jsfiddle.net/JSWorld/Hp4W7/32/
<div ng-repeat="division in divisions | orderBy:['group','sub']">{{division.group}}-{{division.sub}}</div>