rosslavery / angular2-tag-input

Tag input component for Angular 2
45 stars 42 forks source link

Exception: autocompleteItems.filter is not a function #34

Closed rochapablo closed 7 years ago

rochapablo commented 7 years ago

I'm getting the follow error:

EXCEPTION: Error in ./TagInputComponent class TagInputComponent - inline template:9:6 caused by: _this.autocompleteItems.filter is not a function

ORIGINAL EXCEPTION: _this.autocompleteItems.filter is not a function

This is my component:

this.user = { countries: [] };
this.countries = ['BRL', 'EUA'];

And my template:

<rl-tag-input [(ngModel)]="user.countries" name="countries" autocomplete="true" autocompleteItems="countries" placeholder="Testing placeholder"></rl-tag-input>

What could I be missing?

rochapablo commented 7 years ago

Never mind, I just had to change the autocompleteItems to [(autocompleteItems)].