ng2-dropdown
Simple dropdown for your angular2 applications using bootstrap3. Does not depend of jquery. If you don't want to use it without bootstrap - simply create proper css classes. Please star a project if you liked it, or create an issue if you have problems with it.
Installation
-
Install npm module:
npm install ng2-dropdown --save
-
If you are using system.js you may want to add this into
map
andpackage
config:
Usage
My Heroes Badman Sadman Lieman
dropdown
directive is used to specify where your dropdown startsdropdownToggle
Indicates if dropdown should be closed when user double-clicks the dropdown opening button. Default is true.(onOpen)
in dropdown is called when dropdown is opened(onClose)
in dropdown is called when dropdown is closed
dropdown-open
is used ona
,button
or any other clickable element to open a dropdown on its clickdropdown-not-closable-zone
(not used in the example above, however is used in the examples below) is used to prevent closing dropdown when you click on its elements. Its highly usable when you want to create interactive dropdowns.
Sample
;; @ @ ;
Take a look on samples in ./sample for more examples of usages.