class
property should not transfer your class
to {}
, just specify the binding of the class
to [ngClass]
properties. In this case, you can do [ngClass]="class"
Your question seems unclear, which does not explicitly indicate where you wanted to apply the class on each row
/ class for different row
If these classes should appear on one line, then just pass the rowClasses
directive to [ngClass]
[ngClass]="rowClasses"
source share