title: Change ngFor list thru dropdown menu via filter pipe in angular 2/4
body: <p>how can I acomplish to change the view of my list when i select one option on dropdown list, via filter pipe? users I get from service... list is functioning, but it would be nice if I could filter it since it has hundreds of users active and inactive...</p>
  
  <p>in app.component.ts</p>
  
  <pre><code>inactiveUser: string = 'All';
  </code></pre>
  
  <p>in my app.component.html i have ngFor that shows me all users</p>
  
  <pre><code>     &lt;tr *ngFor="let user of userlist"&gt;
              &lt;td&gt;{{user.name}}&lt;/td&gt;
              &lt;td&gt;{{user.email}}&lt;/td&gt;
       &lt;/tr&gt;
  </code></pre>
  
  <p>above, I've created simple dropwdown</p>
  
  <pre><code>    &lt;select id="ActiveUser" class="form-control" [(ngModel)]="inactiveUser"&gt;
              &lt;option value="All"&gt;All&lt;/option&gt;
              &lt;option value="Active"&gt;Active&lt;/option&gt;
              &lt;option value="Inactive"&gt;Inactive&lt;/option&gt;
          &lt;/select&gt;
  </code></pre>
  
  <p>Inactive users have prefix of inactive in their mail, for example inactive_john.doe@gmail.com, so I'm trying to filter those with that prefix, but don't know how...</p>
  
  <p>I've created pipe using cli</p>
  
  <pre><code> import { Pipe, PipeTransform } from '@angular/core';
  
   @Pipe({
    name: 'inactiveUsers'
   })
   export class InactiveUsersPipe implements PipeTransform {
  
  transform(value: string, args: any[]): string | boolean {
  
        //example
        //var str = "inactive_john.doe@mail.com";
        //var n = str.includes("inactive");
  
  }
  </code></pre>