title: Apply CSS class dynamically on TS file
body: <p>I have inline HTML content on <code>ts</code> file as shown below.</p>
  
  <pre><code>"&lt;div style=\"font-size: 20px;\"&gt;" + remainingAmount.toLocaleString() + "&lt;/div&gt;"
  </code></pre>
  
  <p>Now I need to apply <code>color: red</code> according to the condition. </p>
  
  <p>i.e <code>if(this.isSpentOver) color:red else default</code></p>
  
  <p>I can do this in <code>HTML</code> file like below:</p>
  
  <pre><code>[ngClass]="{'color-red': isSpentOver}"
  </code></pre>
  
  <p>But how can I do that on <code>ts</code> file?</p>