Angular 10 Ngstyle Conditional Example
Example 1: conditional style angular
<div [ngStyle]="{'color':employee.country === 'India' ? 'orange' : 'red' }"></<div>
Example 2: ngstyle conditional
<div [ngClass]="{'class1': true, 'class2': false}"></div> <!--passed as an object-->
Comments
Post a Comment