ngstyle if condition angular code example
Example: ngstyle conditional
<div [ngClass]="{'class1': true, 'class2': false}"></div> <!--passed as an object-->
<div [ngClass]="{'class1': true, 'class2': false}"></div> <!--passed as an object-->