首页 > 代码库 > angularJs下拉框

angularJs下拉框

1 只是一个下拉框

<!-- <select ng-model="areaType" ng-disabled="isDisable" class="form-control" ng-options="c.code as c.code for c in codes"> -->
<!-- <option value="">---请选择---</option> -->
<!-- </select> -->

 

2 可输入下拉框,并且支持模糊查询

<ui-select ng-model="areaType.selected" theme="bootstrap" ng-change="change()" search-enabled="searchEnabled" style="width: 150px;" title="Choose a areaType">
<ui-select-match placeholder="Please select">{{$select.selected.area}}</ui-select-match>
<ui-select-choices repeat="areaType in areaTypes | propsFilter: {id: $select.search, area: $select.search}">
<div ng-bind-html=" areaType.area | highlight: $select.search "></div>
<!-- <small> -->
<!-- {{areaType.area +‘-‘+areaType.id}} -->
<!-- </small> -->
</ui-select-choices>
</ui-select>

 

angularJs下拉框