This article mainly explains in detail how to implement the drop-down selection box in AngularJs + bootstrap. It is mainly shared with you in the form of code. I hope it can help you.
Environment: bootstrap-select.js, bootstrap-select.css
Method 1
<select name="departInfo" ng-model="searchArgQry.departInfoSet" class="form-control" multiple size="1" bootstrap-select="{'liveSearch': true}"> <c:forEach items="${departInfoList}" var="departInfo"> <option value="${departInfo.id}">${departInfo.deptName}</option> </c:forEach> </select>
where partInfoList is a List object
Method 2
<select class="form-control" name="deptId" ng-model="searchArg.deptId" multiple ng-options="k as v for (k, v) in allDept" size="1" bootstrap-select="{'liveSearch': true}"></select>
where allDept is the Map object, key is the ID, and value is the value
Effect:
Related recommendations:
vue.js implements radio buttons, check boxes and drop-down boxes
js implements left and right selection boxes
js implementation of drop-down box support for adding and deleting methods
The above is the detailed content of Detailed explanation of how AngularJs + bootstrap implements drop-down selection box. For more information, please follow other related articles on the PHP Chinese website!