我有一个在我的代码中使用ng-options指令的选择:
ng-options="cls as cls.name group by cls.related for cls in classes track by cls.name | orderBy:'related' "
cls.related可能有价值:
问题在于ng-options将不相关的组置于顶层,将相关组置于其下。我该如何更改订单?
答案 0 :(得分:0)
试试这个:
ng-options="cls as cls.name group by cls.related for cls in classes track by cls.name | orderBy:'related':true "
//Doc:
{{ orderBy_expression | orderBy : expression : reverse}}