https://github.com/instance-oom/ngx-select2
Select2 component for Angular
https://github.com/instance-oom/ngx-select2
angular2 components ngx seletc2
Last synced: 5 months ago
JSON representation
Select2 component for Angular
- Host: GitHub
- URL: https://github.com/instance-oom/ngx-select2
- Owner: instance-oom
- License: apache-2.0
- Created: 2017-06-28T11:03:51.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2022-12-07T19:46:05.000Z (about 3 years ago)
- Last Synced: 2024-10-30T08:26:40.562Z (about 1 year ago)
- Topics: angular2, components, ngx, seletc2
- Language: TypeScript
- Homepage: http://lon-yang.github.io/ngx-select2/
- Size: 814 KB
- Stars: 14
- Watchers: 2
- Forks: 5
- Open Issues: 16
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ngx-select2
Select2 component for Angular
[](https://david-dm.org/lon-yang/ngx-select2?type=peer)
[](https://badge.fury.io/js/ngx-select2)
[](https://opensource.org/licenses/Apache2.0)
# Usage
- Add `jQuery` and `Select2` lib
```html
```
- Install `ngx-select2`
```bash
npm i ngx-select2
```
- Use select2 component
```ts
import { LSelect2Module } from 'ngx-select2';
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
FormsModule,
LSelect2Module
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
```
```html
```
# Options
- data: select2 init data for select
- options: select2 options
- disabled: disable select2 component
- valueChange: `output`. Fire on value change, same as `ngModelChange`
# ChangeLog
- `0.2.0`: Add `valueChange`, Support `Angular 6`
- `0.3.0`: Support `Angular 9`