Reputation: 1755
I have md-grid
that builds table:
<div *ngFor="let replacement of getReplcaementRows()">
<md-grid-tile rowspan="5" colspan="1" class="md-grid-body"></md-grid-tile>
</div>
So, how to change content only for cells in first column by vertically?
I mean this:
**1** 2 3
**4** 5 6
**6** 7 8
Upvotes: 0
Views: 73
Reputation: 13297
You can use the index
from *ngFor
to find out the first item in each row and add some *ngIf
statements to control the view.
Example (using your example):
<md-grid-list rowspan="5" colspan="1" cols="3">
<md-grid-tile class="md-grid-body"
*ngFor="let replacement of getReplcaementRows(); let i = index">
<span *ngIf="i%3 == 0">**{{replacement}}**</span>
<span *ngIf="i%3 != 0">{{replacement}}</span>
</md-grid-tile>
</md-grid-list>
Upvotes: 1