How to use ngfor in grid-list by material
Add the loop on mat-grid-tile
.
<mat-grid-list cols="2" rowHeight="7:1">
<mat-grid-tile>
<u>abc</u>
</mat-grid-tile>
<mat-grid-tile>
<u>test</u>
</mat-grid-tile>
<ng-container>
<mat-grid-tile *ngFor="let item of datas">
{{ item.abc}}
{{ item.test}}
</mat-grid-tile>
</ng-container>
</mat-grid-list>
For edited question:
<mat-grid-list cols="2" rowHeight="7:1">
<mat-grid-tile>
<u>abc</u>
</mat-grid-tile>
<mat-grid-tile>
<u>test</u>
</mat-grid-tile>
<ng-container *ngFor="let item of datas">
<mat-grid-tile>
{{ item.abc}}
</mat-grid-tile>
<mat-grid-tile>
{{ item.test}}
</mat-grid-tile>
</ng-container>
</mat-grid-list>
Stackblitz