ng2-chips
v0.0.13
Published
Chips for Angular2
Downloads
11
Maintainers
Readme
ng2-chips
Input Module with chips based on Angular 2. This module is designed with autocomplete.
Quick Start
npm install ng2-chips --save
Based Image
This module is based on Repo by rosslavery/angular2-tag-input
Thank you for this great work. This module licensed based on ISC, too.
Implemenate
// In one of your application components
import {TagInputComponent} from 'angular2-tag-input';
@Component({
selector: 'your-component-selector',
directives: [TagInputComponent] // Add to directives
template: `<tag-input></tag-input>`
})
API
Inputs
ngModel
:string[]
- Required Property to store the resulting tag list in.placeholder
:string
- Default:'Add a tag'
- Placeholder for the<input>
tag.delimiterCode
:string
- Default:'188'
- ASCII keycode to split tags on. Defaults to comma.addOnBlur
:boolean
- Default:true
- Whether to attempt to add a tag when the input loses focus.addOnEnter
:boolean
- Default:true
- Whether to attempt to add a tag when the user presses enter.addOnPaste
:boolean
- Default:true
- Whether to attempt to add a tags when the user pastes their clipboard contents.allowedTagsPattern
:RegExp
- Default:/.+/
- RegExp that must match for a tag to be added.