I am using angular6 and trying to implement background color through inline styling in angular table. If i hard code the values, the background color changes but if i try to put it through variable it remain same.
Template:
<ng-container matColumnDef="color">
<th mat-header-cell *matHeaderCellDef mat-sort-header> color </th>
<td mat-cell *matCellDef="let element" [ngStyle]="{'background-color':'#element.color'}"> #{{element.color}} </td>
</ng-container>
you can use like that for only set one style then try use like that
second way used like that for multiple
for your style used like that