AngularJS multiselect component based off ngOptions
.
- AngularJS v1.5.0
- Bootstrap v3.3.6 for dropdown styles
- UI Bootstrap v1.1.2 for dropdown functionality
Note that backport
supports older versions of these dependencies.
-
Install dependencies
npm install
-
Compile JavaScript & CSS
gulp all
-
Run local webserver
gulp serve
The interface for this directive is based off ngOptions
:
<amo-multiselect
ng-model="app.model"
options="option.id as option.label for option in app.options"
on-change="app.onChange(label)"
on-toggle-dropdown="app.onToggleDropdown(isOpen)"
label="app.label"
search-text="Search..."
select-text="Select..."
select-all-text="Select All"
deselect-all-text="Deselect All"
selected-suffix-singular-text="thing"
selected-suffix-text="things">
</amo-multiselect>
where the value of options
is of the following form: [
select
as
]
label
for
value
in
array
Install the Karma commandline interface (karma-cli
) globally and run:
karma start