日々精進

新しく学んだことを書き留めていきます

AngularJSで複数キーによるソートをorderByフィルタで行う

以下のようにソートキーを配列でorderByに渡すとできる。

<div ng-repeat="division in divisions | orderBy:['group','sub']">{{division.group}}-{{division.sub}}</div>

参考:

stackoverflow.com