title: How to toggle class angular2 using *ngIf
body: <p>Hello I need toggle class using angular2 <code>*ngIf</code> statement </p>
  
  <p><code>&lt;i *ngIf="visible" [(ngClass)]="{{arrow}}"&gt;&lt;/i&gt;</code> &lt;&lt; this line of code not work correctly</p>
  
  <hr>
  
  <p>here is my <code>ts</code> code</p>
  
  <pre><code>private visible = true;
  private i = 0;
  private arrow = 'ic-v';
  private showList(){
      if(this.i == 0){
          this.i = 1;
          this.visible = false;
          this.arrow = 'ic-v-up';
      }
      else
      {
          this.i = 0;
          this.visible = true;
          this.arrow = 'ic-v';
      }
  }
  </code></pre>