1.2.3 • Published 9 years ago

angular2-tag-input v1.2.3

Weekly downloads
305
License
ISC
Repository
-
Last release
9 years ago

angular2-tag-input

Tag input component for Angular 2

Demo & Examples

View Demo

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

NameTypeDefaultDescription
addOnBlurbooleantrueWhether to attempt to add a tag when the input loses focus.
addOnCommabooleantrueWhether to attempt to add a tag when the user presses comma.
addOnEnterbooleantrueWhether to attempt to add a tag when the user presses enter.
addOnPastebooleantrueWhether to attempt to add a tags when the user pastes their clipboard contents.
addOnSpacebooleantrueWhether to attempt to add a tags when the user presses space.
allowDuplicatesbooleanfalseAllow duplicate tags.
allowedTagsPatternRegExp/.+/RegExp that must match for a tag to be added.
autocompletebooleanfalseToggle autocomplete mode on/off
autocompleteItemsstring[][]List of suggestions for autocomplete menu
autocompleteMustMatchbooleantrueWhether a tag must be present in the suggestions list to be valid
autocompleteSelectFirstItembooleantruePre-highlight the first item in the suggestions list
placeholderstring'Add a tag'Placeholder for the <input> tag.

Outputs

NameType EmittedDescription
addTagstringEmits the added tag string
removeTagstringEmits the removed tag string
1.2.3

9 years ago

1.2.2

9 years ago

1.2.1

9 years ago

1.2.0

9 years ago

1.1.2

10 years ago

1.1.1

10 years ago

1.1.0

10 years ago

1.0.0

10 years ago

0.1.5

10 years ago

0.1.4

10 years ago

0.1.3

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago