An AngularJS directive for the plugin multi-select
Table of content
Demo
Depenecies
- jQuery 1.8+
- angularjs
- jquery.multi-select.js
Optional
- jquery.quicksearch.js (docs - find the title
Searchable
)
Installation
npm install multi-select-angularjs --save
<link href="node_modules/multiselect/css/multi-select.css" rel="stylesheet" />
<script src="node_modules/jquery/dist/jquery.min.js"></script>
<script src="node_modules/angular/angular.min.js"></script>
<script src="node_modules/multiselect/js/jquery.multi-select.js"></script>
<script src="node_modules/jquery.quicksearch/dist/jquery.quicksearch.min.js"></script>
<script src="node_modules/multi-select-angularjs/dist/angular.multi-select.js"></script>
Usage
javascript
app.module('your-modoule', ['jq-multi-select']);
html
<select multiple data-ng-options="option as option for option in options" data-ng-model="selectedOptions" data-multi-select="options"></select>
Options / Events
Pass the options (docs - find the title options
) object into ms-options
attribute.
javascript
$scope.msOptions = {
afterInit: function (container) {
console.log('afterInit');
}
};
html
<select multiple data-ng-options="option as option for option in options" data-ng-model="selectedOptions3" data-multi-select="options" data-ms-options="msOptions2"></select>
Contributors
License
MIT License.