【发布时间】:2016-08-01 02:07:13
【问题描述】:
In this plunk 我有一个带有名称列表的 ui-select。我需要允许用户输入列表中的名称或列表中没有的名称。
如果我尝试输入不在列表中的名称,ui-select 会自动用列表中最接近的值替换该值。
有没有办法得到不在列表中的值?
HTML
<ui-select ng-model="ctrl.person.selected" theme="bootstrap">
<ui-select-match>{{$select.selected.name}}</ui-select-match>
<ui-select-choices repeat="item in ctrl.people | filter: $select.search">
<div ng-bind-html="item.name | highlight: $select.search"></div>
<small ng-bind-html="item.email | highlight: $select.search"></small>
</ui-select-choices>
</ui-select>
【问题讨论】:
标签: ui-select angular-ui-select