I have a multiple ui-select widget and i need to update the choices by click on update button.
<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>
If i use array of strings for people variable it works fine. But when i use array of objects then duplicates appears in choices. Here is the snippet http://plnkr.co/edit/Jbhv1stbXEdNnt3of5aW?p=preview How can i avoid duplicates with objects? Help please.