1.2.3-w • Published 6 years ago
bf-ng2-tag-input v1.2.3-w
angular2-tag-input
Tag input component for Angular 2
Demo & Examples
Quick Start
npm install angular2-tag-input --save
// In one of your application NgModules
import {RlTagInputModule} from 'angular2-tag-input';
@NgModule({
imports: [
RlTagInputModule
]
})
export class YourModule {}
// In one of your component templates
<rl-tag-input [(ngModel)]="tags" placeholder="Testing placeholder"></rl-tag-input>
API
Inputs
Name | Type | Default | Description |
---|---|---|---|
addOnBlur | boolean | true | Whether to attempt to add a tag when the input loses focus. |
addOnComma | boolean | true | Whether to attempt to add a tag when the user presses comma. |
addOnEnter | boolean | true | Whether to attempt to add a tag when the user presses enter. |
addOnPaste | boolean | true | Whether to attempt to add a tags when the user pastes their clipboard contents. |
addOnSpace | boolean | true | Whether to attempt to add a tags when the user presses space. |
allowDuplicates | boolean | false | Allow duplicate tags. |
allowedTagsPattern | RegExp | /.+/ | RegExp that must match for a tag to be added. |
autocomplete | boolean | false | Toggle autocomplete mode on/off |
autocompleteItems | string[] | [] | List of suggestions for autocomplete menu |
autocompleteMustMatch | boolean | true | Whether a tag must be present in the suggestions list to be valid |
autocompleteSelectFirstItem | boolean | true | Pre-highlight the first item in the suggestions list |
placeholder | string | 'Add a tag' | Placeholder for the <input> tag. |
Outputs
Name | Type Emitted | Description |
---|---|---|
addTag | string | Emits the added tag string |
removeTag | string | Emits the removed tag string |
1.2.3-w
6 years ago
1.2.3-v
7 years ago
1.2.3-u
7 years ago
1.2.3-t
7 years ago
1.2.3-s
7 years ago
1.2.3-r
7 years ago
1.2.3-q
7 years ago
1.2.3-p
7 years ago
1.2.3-o
7 years ago
1.2.3-n
7 years ago
1.2.3-m
7 years ago
1.2.3-l
7 years ago
1.2.3-k
7 years ago
1.2.3-j
7 years ago
1.2.3-i
7 years ago
1.2.3-h
7 years ago
1.2.3-g
7 years ago
1.2.3-f
7 years ago
1.2.3-e
7 years ago
1.2.3-d
7 years ago
1.2.3-c
7 years ago
1.2.3-b
7 years ago
1.2.3-a
7 years ago