angularjs-dropdown v1.0.3
angularjs-dropdown
A simple directive for using in your angular applications
Demo
Demos are in demo folder.
Open any demo file in browser and begin to use.
Install
npm install angularjs-dropdownUsage
Include
angular-dropdown.cssandangular-dropdown.jsin your project fromsrcfolderImport
angularDropdownas a dependecy in your project
angular
.module('nameOfModule', ['angularDropdown'])- Add the directive to your html
<angular-dropdown
....
></angular-dropdown>Attributes
These attributes are available to set on the angular-dropdown directive.
dd-model
Chosen items in the dropdown.
Type: array of objects
dd-data
An array of strings or object to show in the dropdown.
Type: array of objects
dd-placeholder
Text that will show if items of the dropdown aren't chosen.
Type: string
Default: Select ...
dd-multiple
Allow or disallow to choose several items in the dropdown.
Type: boolean
Default: false
dd-value
Property with unique value in array of objects.
Type: string
Default: id
dd-label
Value of property that will show in the dropdown.
Type: string
Default: label
dd-click
Handler of click on item of the dropdown.
Type: function
dd-select-all
Handler of click on items of the dropdown.
Type: function
dd-deselect-all
Handler of click on items of the dropdown.
Type: function
Test
You can run the tests:
npm run testLicense
MIT