I\'m looking for the angular 2 way to do this.
I simply have a list of items, and I want to make an input whos job is to filter the list.
HTML
{{item.name}}
Component
search(): void { let term = this.searchTerm; this.items = this.itemsCopy.filter(function(tag) { return tag.name.indexOf(term) >= 0; }); }
Note that this.itemsCopy is equal to this.items and should be set before doing the search.