title: Angular 2 Custom Pipe
body: <p>I'm following the turorial of John Lindquist about Angular 2 on egghead.com and after doing exactly the same thing as him I don't have the same result.</p>
  
  <p>It's about the course 17.</p>
  
  <p>I have a custom filter which works perfectly : </p>
  
  <p>started-pipe.ts</p>
  
  <pre><code>import {Pipe} from '@angular/core';
  
  @Pipe({
      name: "started"
  })
  
  export class StartedPipe{
      transform(value, [status]){
          return value.filter((item)=&gt; item.status === "started");
      }
  }
  </code></pre>
  
  <p>todo-list.ts</p>
  
  <pre><code>import {Component, Input} from '@angular/core';
  import {TodoService} from "./todo-service";
  import {TodoItemRenderer} from "./todo-item-renderer";
  import {StartedPipe} from './started-pipe';
  
  @Component({
      selector: 'todo-list',
      pipes: [StartedPipe],
      directives: [TodoItemRenderer],
      template: `
          &lt;div&gt;
              &lt;ul&gt;
                  &lt;li *ngFor="let todo of todoService.todos | started :     'started'"&gt;
                      &lt;todo-item-renderer 
                      [todo]="todo"
                      (toggle)="todoService.toggleTodo($event)"&gt;
                      &lt;/todo-item-renderer&gt;
                  &lt;/li&gt;
              &lt;/ul&gt;
          &lt;/div&gt;
      `
  })
  
  export class TodoList{
      @Input() status;
      constructor(public todoService: TodoService){}
  }
  </code></pre>
  
  <p>But when I want to use the array arg of my transform value it does not work anymore : </p>
  
  <p>started-pipe.ts</p>
  
  <pre><code>import {Pipe} from '@angular/core';
  
  @Pipe({
      name: "started"
  })
  
  export class StartedPipe{
      transform(value, [status]){
          return value.filter((item)=&gt; item.status === status);
      }
  }
  </code></pre>
  
  <p>If you have an idea it's welcomed !</p>
  
  <p>Thanks.</p>