1.0.2 • Published 7 years ago
angular-search-multi-select v1.0.2
Install
npm install --save angular-search-multi-select
Usage
case 1: used as a lib (in html)
index.html
<html ng-app="demo">
<body>
<div class="main" ng-controller="DemoController">
<search-multi-select select-options-config="selectOptionsConfig" ></search-multi-select>
</div>
<script type="text/javascript" src="js/angular-search-multi-select.js"><script>
<script type="text/javascript" src="demo.js"></script>
</body>
</html>
demo.js
case 2: used as a node module (in webpack entry.js)
method
getValsByKey(key)
指令会为配置对象增加一个getValsByKey(key)方法,用于获取被选中options的key属性的value,最后以一个数组返回,方法定义如下: