title: angular 2. Pipes. Cannot read property of undefined
body: <p>i made a pipe</p>
  <pre><code>@Pipe({
    name: 'orgFilter'
  })
  export class OrgFilterPipe implements PipeTransform {
      transform(orgs: Organization[], args: String[]): any {
          console.log(orgs)
         let filter = args[0].toLowerCase();
         return filter ? orgs.filter((org:Organization) =&gt; org.name.toLowerCase().indexOf(filter) != -1): orgs;
  }
  </code></pre>
  <p>and using it in html:</p>
  <pre><code>&lt;tbody&gt;
          &lt;tr *ngFor=&quot;#organization of organizations | orgFilter:listFilter.value&quot;&gt;
              &lt;td&gt;{{ organization.organizationName }}&lt;/td&gt;
              &lt;td&gt;{{ organization.city }}&lt;/td&gt;
              &lt;td&gt;{{ organization.state }}&lt;/td&gt;
              &lt;td&gt;{{ organization.country }}&lt;/td&gt;
              &lt;td&gt;
                  &lt;i class=&quot;material-icons&quot;&gt;mode_edit&lt;/i&gt;
              &lt;/td&gt;
              &lt;td&gt;
                  &lt;i class=&quot;material-icons&quot;&gt;delete&lt;/i&gt;
              &lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;
                  &lt;div class=&quot;col-md-4&quot;&gt;&lt;input type=&quot;text&quot; #listFilter (keyup)=&quot;0&quot; /&gt;&lt;/div&gt;
              &lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
  &lt;/tbody&gt;
  </code></pre>
  <p>i am getting an error
  browser_adapter.js:84 TypeError: Cannot read property 'toLowerCase' of undefined
  at t.transform (orgFilter.ts:9)</p>
  <p>where is the problem? does this mean that args doesn't have any values? am i using pipe wrong in html?</p>