How to pass array as arg in Pipe in Angular2
<p>I have created a Pipe which purpose is to filter a list depending on a list of tags.</p>

<pre><code>@Pipe({
  name: "tagfilter"
})
export class TagFilterPipe implements PipeTransform {
    transform(items: Event[], args: any[]) :any {
    if (args.length === 0) {
      return items;
    }
    return _.filter(items, (item: any) =&gt; {
            return (_.intersection(item.tags, args[0]).length &gt; 0)
        });
    }
}
</code></pre>

<p>I am then using it like this :</p>

<pre><code>&lt;tbody class="myline" *ngFor="#event of chapter.events | tagfilter:selectedTags" [event]="event"&gt;
</code></pre>

<p>However, "selectedTags" is an array of strings and if I add or remove entries from this array, it does not trigger the filter and so, my list is not filtered :/</p>