You can use the * ngIf structured directive with if-else syntax to achieve this result.
<label *ngIf="j === 0; else elseBlock">{{val}}</label> <ng-template #elseBlock> <label style="color:#000000;font-size:12px;padding-top: 5px">{{val}}</label> </ng-template>
Another option is to use two *ngIf and invert the conditional expression, for example:
<label *ngIf="j === 0">{{val}}</label> <label *ngIf="j !== 0" style="color:#000000;font-size:12px;padding-top:5px">{{val}}</label>
Teddy sterne
source share