how can force custom filter pipe be executed in angular2
<p>I have a question in custom filtering in angular2 .</p>

<p>This is the my scenario:</p>

<p>My page contains several custom components. One of them is responsible for showing data at the left side of the page: (componentA)</p>

<pre><code>  &lt;md-list-item *ngFor="let item of items | filter :  filter | sort:   sort; let i = index"  " &gt;
       &lt;template [render]="itemTemplateRef" [context.item]="item" 
       [context.index]="index"&gt;&lt;/template&gt;
   &lt;/md-list-item&gt;
</code></pre>

<p>and also ,filter is done by a custom filtering:</p>

<pre><code>    import {Pipe, PipeTransform} from '@angular/core';



@Pipe({ name: 'filter' })

export class FilterPipe implements PipeTransform {
    transform(values: any[], filter: any): any {
        if (typeof filter !== "function") return values;
          return values.filter((elem) =&gt; {
             return filter(elem);
        });
    }
}
</code></pre>

<p>In main page ,I send a function as an input attribute into Component A:</p>

<pre><code>   public filter = (element: MyBean) =&gt; {
             return (element.email !== undefined);

    }
</code></pre>

<p>at Loading of the page, it's executed without any problems. but I want to change filter condition several times by clicking on a checkbox.
I know this fact that,  pure filtering is executed , if the input value change.
But what I don't know  , which input value in my scenario should be changed to force filtering?  </p>

<p>when I add following function in the Onchange event of checkbox,nothing is filtered.(items is bind into my component shown data)</p>

<pre><code>    createFilterCondition = (searchCondition: string) =&gt; {

        items.filter((element) =&gt; {
            return this.doFilter(elem);
        });
    }
   public doFilter= (element: MessagesBean) =&gt; {

        return (element.email !== undefined);
    }
</code></pre>

<p>thanks for any help</p>