我有一个多个 ui-select 小部件,我需要通过单击更新按钮来更新选择。
<ui-select multiple 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>
{{person.email}}
</ui-select-choices>
</ui-select>
如果我对人员变量使用字符串数组,它可以正常工作。但是当我使用对象数组时,重复项会出现在选项中。这是片段http://plnkr.co/edit/Jbhv1stbXEdNnt3of5aW?p=preview我怎样才能避免与对象重复?请帮忙。