title: Angular how to conditionally change css class?
body: <p>I have an icon with a default class , the class name is card-icon , now how do I change the class based on condition or disable the class ?</p>
  <p>Because the default color of the icon is gray now when condition is met or condition true I want to change it to black color.</p>
  <p>The condition is below , when condition is true disable class=&quot;card-icon&quot; or if it is not possible to disable then replace when a new class for example  [class.newclass] .</p>
  <p>Any idea how to implement this guys ? Thank you.</p>
  <p>#Icon with default class</p>
  <pre><code> &lt;mat-icon class=&quot;card-icon&quot;&gt;group&lt;/mat-icon&gt;
  </code></pre>
  <p>#Condition</p>
  <pre><code>&lt;mat-icon class=&quot;active-icon&quot; [class.newclass]=&quot;currentTabElement === 'group'&quot;&gt;group&lt;/mat-icon&gt;
  </code></pre>