chip-selections
v0.1.5
Published
This Angular Module allows you to add, remove chips in an input field as a formControl
Downloads
2
Maintainers
Readme
Chip Selections
Angular component using chips to add selections as a formControl. You can also add multiple entries into the field (comma delimited) and it will parse and add the chips.
Installation
npm install chip-selections
Scaffolding
Import the module into your project under imports
imports: [
BrowserModule,
AppRoutingModule,
ChipSelectionsModule
],
Selector Usage
This is the basic selector with no content, header or hiddend content
This selector uses content projection - the following selector can be projected into the component - the element does not matter.
Inputs
The following Inputs are available
| Input | Type | Defaut | Description | | ----- | ---- | ------ | ----------- | | placeholder | STRING | '' | placeholder text | | label | STRING | '' | label for input |
Outputs
| Event | Type | Description | | ---------- | ------ | ----------- | | change | STRING | all chips in input as string - comma delimited |
FormControl
formControlName="chips"
<wav-chip-selections formControlName="chips"></wav-chip-selections>
chipSelections = this.fb.group({
chips: ['sample_1, sample_2, sample_3, sample_4'],
})