Angular-Select2-JS-Component
Related Versions
Angular-Select2-Component is based on these plugins and libs(version):
How to use
Install
// npm installnpm install angular-select2-js-component --save// if you have not installed jquerynpm install jquery --save
Use as component
- Import component.
// import NgModule;// import Select2Component;@
- Template.
Options
options
:option[]
- select options for select2
option
:{id: value, text: key}
orstring
ngModel
: option value that is selectedid
orstring
while multiple is disableid[]
orstring[]
while multiple is enable
onSelect
- callback when option selected
- parmas:
option
({id: value, text: key, selected: ifSelected}
orstring
)
settings
- configurable settings, see Select2 options API
setting
:{ settingOption: value, settingOption: value }