I have a component using mat tab from angular material 7.
I want to change the background color of my tabs depending on a boolean value of my typescript variable.
You might not want to set encapsulation: ViewEncapsulation.None, this will make the styling for this component be applied to all other components too.
encapsulation: ViewEncapsulation.None
Instead you can set the color for the tab in your styles.scss like this:
styles.scss
.mat-tab-header{ background-color: #424242; }