1<div [ngStyle]="{'color':employee.country === 'India' ? 'orange' : 'red' }"></<div>
1// ngStyle (conditional Style)
2<div *ngFor='let [data] of [dataArray]; let i=index;'>
3 <h2 [style.background]="i>1? 'green': 'red'"> {{i}} {{data.title}} </h2>
4
5 </div>
6
7//if the index of the element is 1 or 0, the background will be red, if it is over 1 the background will be green
8