title: Change color on click with switch
body: <p>I have some labels (<strong>ID, Start after ID, Vehicle name</strong>...etc) that I would like to change color when selected (something like "active" tab).</p>
  
  <p>Thing is that beside every label I have "sort" icon and that icon changes it color when sort is in order (white) or reverse (red).</p>
  
  <p>What I want is to change color of label text so that user can be aware on what element is sort active at that moment wether that sort is in order or reverse.</p>
  
  <p>How can I do that? Is there any way to do it with ngClass,ngStyle? I'm using Angular 2</p>
  
  <p>Html code for labels, sort images and etc.</p>
  
  <pre><code>&lt;div class="vessel-label-div"&gt;
          &lt;div class="field-width8"&gt;
              &lt;label class="label-style"&gt;ID&lt;/label&gt;
              &lt;div (click)="showSelected1()"&gt;
                  &lt;span *ngIf="!selected1"&gt;&lt;div class="sort-image-div" (click)="sortByIdUp()"&gt;&lt;img src="/images/sort1.png" style="width: 98%;"&gt;&lt;/div&gt;&lt;/span&gt;
                  &lt;span *ngIf="selected1"&gt;&lt;div class="sort-image-div" (click)="sortByIdDown()"&gt;&lt;img src="/images/sort2b.png" style="width: 98%;"&gt;&lt;/div&gt;&lt;/span&gt;
              &lt;/div&gt;
          &lt;/div&gt;
          &lt;div class="field-width9"&gt;
              &lt;label class="label-style"&gt;Start after ID&lt;/label&gt;
              &lt;div (click)="showSelected2()"&gt;
                  &lt;span *ngIf="!selected2"&gt;&lt;div class="sort-image-div" (click)="sortByAfterIdUp()"&gt;&lt;img src="/images/sort1.png" style="width: 98%;"&gt;&lt;/div&gt;&lt;/span&gt;
                  &lt;span *ngIf="selected2"&gt;&lt;div class="sort-image-div" (click)="sortByAfterIdDown()"&gt;&lt;img src="/images/sort2b.png" style="width: 98%;"&gt;&lt;/div&gt;&lt;/span&gt;
              &lt;/div&gt;
          &lt;/div&gt;
          &lt;div class="field-width16"&gt;
              &lt;label class="label-style"&gt;Vessel name&lt;/label&gt;
              &lt;div (click)="showSelected3()"&gt;
                  &lt;span *ngIf="!selected3"&gt;&lt;div class="sort-image-div" (click)="sortByNameUp()"&gt;&lt;img src="/images/sort1.png" style="width: 98%;"&gt;&lt;/div&gt;&lt;/span&gt;
                  &lt;span *ngIf="selected3"&gt;&lt;div class="sort-image-div" (click)="sortByNameDown()"&gt;&lt;img src="/images/sort2b.png" style="width: 98%;"&gt;&lt;/div&gt;&lt;/span&gt;
              &lt;/div&gt;
          &lt;/div&gt;
  </code></pre>