How to change the css class property value dynamically on angular 6?

Viewed 9600

I want to change the css class property value dynamically. On below code 'color' is the variable that I want to pass to the styles.

    @Component({
    selector: 'app-gridmaker-component',
    templateUrl: './gridmaker-component.component.html',
    styles: [`
    ::ng-deep .dx-datagrid .dx-row-alt > td {
        background-color: color!important;  /* color is the variable */
    }
    `]

})

Thanks is advance.

0 Answers
Related