ng style with condition in angular 7 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-->