【发布时间】:2017-04-10 08:22:48
【问题描述】:
我正在使用 ui-select 角度。我需要选择一个具有空值的选项。谷歌了它,但找不到合适的解决方案。
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.23/angular.min.js"></script>
<ui-select allow-clear ng-model="hotelsCtrl.companySelectedInsert" theme="bootstrap">
<ui-select-match placeholder="Select or search company in the list...">{{$select.selected.name}}</ui-select-match>
<ui-select-choices repeat="company in hotelsCtrl.companies | filter: $select.search">
<span ng-bind-html="company.name | highlight: $select.search"></span>
</ui-select-choices>
</ui-select>
【问题讨论】:
标签: javascript angularjs ui-select angular-ui-select