【发布时间】:2015-02-03 07:40:38
【问题描述】:
情况:
在我的应用程序中,我使用 angular ui-select 显示人员列表(对象数组)。
除了一个小问题,一切正常:
列表的第一项不可选择。我不能选择它。
代码:
<ui-select multiple tagging tagging-label="new tag" ng-model="multipleDemo.selectedPeople" theme="select2" ng-disabled="disabled" style="width: 800px;">
<ui-select-match placeholder="Select person...">{{$item.name}} <{{$item.email}}></ui-select-match>
<ui-select-choices repeat="person in people | propsFilter: {name: $select.search, age: $select.search}">
<div ng-bind-html="person.name | highlight: $select.search"></div>
<small>
email: {{person.email}}
age: <span ng-bind-html="''+person.age | highlight: $select.search"></span>
</small>
</ui-select-choices>
</ui-select>
PLUNKER:
http://plnkr.co/edit/CVaMvt4zBUBD2QEsfIdk?p=preview
问题:
如何选择 angular ui-select - 对象数组中的第一项?
注意:
Alexander 的答案是正确的,因为为 ui-select 哪个版本
从 0.9.5 版开始。此问题已解决。
这是在 GitHub 中打开的问题:
https://github.com/angular-ui/ui-select/issues/477#issuecomment-66795541
【问题讨论】:
标签: javascript arrays angularjs select ui-select