angular ngstyle with condition 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-->