Keep it simple!
Use ngClass and define two different css class with different background colors, for example:
.empty{
background: yellow;
}
.content{
background: white
}
In the html you can add something like:
<div [ngClass]="cellContent == cellContent ? 'empty': 'content'">
Where cellContent
can be a string that is either empty or has that what you want to show in the cell.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…