tags-autocomplete
TypeScript icon, indicating that this package has built-in type declarations

1.0.12 • Public • Published

tags-autocomplete

Bootstrap 4 tag component to Angular.

#Usage

** (component).module.ts **

imports: [ ..., TagsAutocompleteModule, ... ]

** (component).html ** ...

<app-tags-autocomplete [tagList]="tags" (onAddItem)="addTagItem($event)" (onRemoveItem)="removeTagItem($event)">

...

** (component).component.ts ** ...

tags : any = []; constructor() { this.tags = [ {value: 'test', text: 'string test1'}, {value: 'test2', text: 'string test2'}, {value: 'test3', text: 'string test3'}, {value: 'test4', text: 'string test4'}, {value: 'test5', text: 'string test5'}, {value: 'test6', text: 'string test6'} ]; }

...

#Events callback

onAddItem() : Returns the object of added item. onRemoveItem : Returns index of removed item.

#Parameters

isRequired : if the input is required and you have to validate it. tagList : list of tags you want to put on this component.

Package Sidebar

Install

npm i tags-autocomplete

Weekly Downloads

1

Version

1.0.12

License

ISC

Last publish

Collaborators

  • imfarias