Here is my code :
<mat-grid-list cols="4" rowHeight="100px">
<mat-grid-tile colspan="2" rowspan="2">
1
</mat-grid-tile>
<mat-grid-tile colspan="2" rowspan="2">
2
</mat-grid-tile>
<mat-grid-tile colspan="1" rowspan="1">
3
</mat-grid-tile>
<mat-grid-tile colspan="1" rowspan="1">
4
</mat-grid-tile>
<mat-grid-tile colspan="2" rowspan="1">
5
</mat-grid-tile>
</mat-grid-list>
I want to manually apply a background color to these tiles.
I know that I can use this method : _setStyle(property: string, value: any): void;
But I have no idea how in my case, since I didn't initialize any MatGridTile object in my component. I don't want to use a dynamically filled grid.
https://stackblitz.com/edit/angular-adjmya?file=app/grid-list-dynamic-example.html
::ng-deep. can u provide a demo code so that we can provide u some solution - Shashank Vivek