title: Angular if condition from html to component?
body: <p>I have this problem being very new in Angular : I want to make multiple filters in a table. So in order to achieve this, I want to make a "if" condition on the input, for example if I have a table head named "Entity" then it will tell my component class that it's the input Entity.</p>
  
  <p>how do I Achieve this ?</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>  public performFilter(filterBy: string): IDonnee[] {
        filterBy = filterBy.toLocaleLowerCase();
        // I'd want to put the condition here like (if input.class == "entity then.."
        if (this.isFiltered) {
          return this.filteredDonnees.filter((donnee: IDonnee) =&gt;
            donnee.entity.toLocaleLowerCase().indexOf(filterBy) !== -1);
        } else {
            return this.donnees.filter((donnee: IDonnee) =&gt;
              donnee.entity.toLocaleLowerCase().indexOf(filterBy) !== -1);
          }
    }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.23/angular.min.js"&gt;&lt;/script&gt;
  
  &lt;table *ngIf="donnees &amp;&amp; donnees.length"&gt;
    &lt;th&gt;
      Entity
      &lt;br&gt;
      &lt;input size={{thSize}} ng-model="entity" class="entity"[(ngModel)]="listFilter"&gt;
    &lt;/th&gt;
    &lt;th&gt;
      bdrID
      &lt;br&gt;
      &lt;input size={{thSize}} ng-model="bdrId" class="bdrId" [(ngModel)]="listFilter2"&gt;
    &lt;/th&gt;
  &lt;/table&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>For example I'd like to get the class name of the input in my JS code.</p>
  
  <p>Sorry if I didn't make myself clear u can ask any question and thanks in advance!</p>