0
fiddle link化妝自動完成搜索下拉不想只是搜索顯示在列表中點擊
<div ng-app="app" ng-controller="myCtrl as vm">
<ui-select tagging ng-model="vm.selected" theme="bootstrap">
<ui-select-match p laceholder="Pick one...">{{$select.selected.value}}</ui-select-match>
<ui-select-choices repeat="val in vm.values | filter: $select.search">
<span ng-bind-html="val.value | highlight: $select.search"></span>
</ui-select-choices>
</ui-select>
</div>
var app = angular.module('app', ['ui.select', 'ngSanitize']);
app.controller("myCtrl", function() {
vm = this;
vm.isLoaded = false;
vm.values = [{
'key': 22,
'value': 'Kevin'
}, {
'key': 24,
'value': 'Fiona'
}];
vm.selected;
});
這是做工精細,但現在我要顯示列表只是搜索不想在搜索框中