Angular2: how to use bootstrap-tagsinput properly
I can see some issue in using bootstrap-tags-input with angular batter to use ngTagsInput if you using angular.
Please see more details at : ngTagsInput , demo
the boostrap-tagsinput is a directive. So you can need somethings as follow:
Step 1: Import boostrap-tagsinput
import {TagsInputComponents} from 'bootstrap-tagsinput';
Step 2: Add to directives
@Component({ ... directives: [TagsInputComponents], ...})
then use it in your view.
Hope this help!
For anyone looking for an easier solution. I ended up using angular2-tag-input
First you'll have to run your node command prompt
npm install angular2-tag-input --save
Then include it in your module
// In one of your application NgModulesimport {RlTagInputModule} from 'angular2-tag-input'; @NgModule({ imports: [ RlTagInputModule ] })// In one of your component templates<rl-tag-input [(ngModel)]="tags" placeholder="Testing placeholder"></rl-tag-input>// In one of your component ts filevar tags= ['tag1','tag2','tag3']