title: fa icons not changing with ngClass
body: <p>I am trying to switch between check and uncheck box when user select the boxes
  or unselect the box .</p>
  
  <p>For that i am using :</p>
  
  <pre><code>&lt;i class="far" ngClass="isItemSelected(item) ? fa-check-square : fa-square"&gt;&lt;/i&gt;
  </code></pre>
  
  <blockquote>
    <p>isItemSelected(item) return true or false</p>
  </blockquote>
  
  <p>But, i cannot see the check box icon changing even on the ui true and false value is passed from the typescript code.</p>
  
  <p><a href="https://i.stack.imgur.com/gY1I0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/gY1I0.png" alt="enter image description here"></a></p>
  
  <p>Can anyone help me.</p>
  
  <p>Full Code Snippet:</p>
  
  <p>Angular Side:</p>
  
  <pre><code>   &lt;ng-container *ngFor="let item of items;let i = index"&gt;
                          &lt;div class="tiles"&gt;
                              &lt;li&gt;{{item}}&lt;/li&gt;
                              &lt;div class="deviceinfo-check-box" (click)="selectedItem(item)"&gt;                         
                                &lt;i class="far" [ngClass]="isItemSelected(item) ? 'fa-check-square' : 'fa-square'"&gt;&lt;/i&gt;
                              &lt;/div&gt;
                          &lt;/div&gt;
      &lt;/ng-container&gt;
  </code></pre>
  
  <p>TypeScriptSide:</p>
  
  <pre><code>  selectedItem(item) {
          if (this.selecteditems.indexOf(item) &lt; 0) {
              this.selecteditems.push(item);
          } else {
              this.selecteditems.splice(this.selecteditems.indexOf(item), 1);
          }
      }
  
  
  
      isItemSelected(item) {
          return this.selecteditems.indexOf(item) &lt; 0 ? false : true;
      }
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/ccEFh.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ccEFh.png" alt="enter image description here"></a></p>
  
  <blockquote>
    <p>these true / false value i am getting using
    {{isItemSelected(iotGateway)}} --></p>
  </blockquote>
  
  <p>URL: <a href="https://angular-m56o7e.stackblitz.io" rel="nofollow noreferrer">https://angular-m56o7e.stackblitz.io</a></p>