AngularJS ngSelectable directive
Allows you to easy select multiples items individually or in a group.
Requirements
- JQuery
- JQueryUI
- AngularJS
Notes:
JQuery must be included before AngularJS. JQueryUI dependecies include core, widget, mouse & selectable. Creating a custom build will greatly reduce the required file size. (CDN links for comparison: full vs minimal)
Examples
Usage
Install the bower package (or just copy the source):
bower install ngSelectable --save
Load the script file: ngSelectable.js in your application:
Add the selectable module as a dependency to your application module:
var myAppModule = angular
Apply the directive to your selectable list:
{{item}}
Selected Items Binding
Selected: {{item}} {{item}}
Directive Toggle
Active Selection {{item}}
Options
All the jQueryUI Selectable options can be passed through selectable-options.
{{item}}
Events
All the jQueryUI Selectable events can be passed through selectable-events with all the angular injections like $index and $event. You can also get the working list ($list), the selected items ($selected) and the JqueryUI object ($ui).
{{item}}