I have the below td with 10 columns. I want to underline first 4 columns but not underline remaining 6. Can anyone help me how to accomplish this.
<tr>
<td *ngFor="let column of Columns; let i=index;" class="cell-underline">
<span>{{column.value}}</span>
</td>
<tr>
You should use the directive ngFor and add a condition class. This is an example for you:
<td *ngFor="let column of columns; index as i;">
<span [ngClass]="{'underline': i < 5 }">{{column.value}}</span>
</td>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With