【发布时间】:2013-05-22 13:12:25
【问题描述】:
我的代码是:
<select ng-model="i.br" ng-options="item.name as info[item.name] for item in e.br | orderBy:info[item.name]" class="combobox">
这里的 orderBy 没有根据 info[item.name] 排序。
e.br is an array like :
0:object (object is name:'abc')
1:object (object is name:'xyz')
..
.
.
.
and info is a hash like :
{
'abc' : '123abc'
'xyz' : '456xyz'
}
我想显示 123abc 并根据这些排序但将模型的值保持为 abc 的任何可能方式
【问题讨论】:
-
请提供更多细节或 plunker demo 问题的语言有点混乱
-
是的,感谢您的 -1。不知道为什么人们会滥用这个不赞成投票的东西......我编辑了这个问题
标签: angularjs angularjs-orderby ng-options