I wanted to style the html elements based on array index value > 4
<div *ngFor="let e of arr ; let i = index" >
(i > 4 ) ? <p [ngClass]="['clr']" [ngStyle]="{'background-color': 'blue'}"> {{e}} </p> : <p> {{e}} </p>
</div>
I wanted to check condition inside the loop. But it just printed as string with out checking condition.