Angular2 integration of Select2.
Install with npm
:
npm i --save angular2-select2
Import the component Select2Component
and add it to your directives:
import Select2Component from 'angular2-select2';
...
@Component({
...
directives: [Select2Component],
...
})
Add the select2
component to your template.
<select2 [options]="[{label: 'foo', value: 'bar', disabled: false}]"></select2>