ngStyle conditional 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-->