I need to change the color of angular material progress bar dynamically. I realized that it is not that simple, so what is the best way to to it?
requirements:
Update:
Avoid using deep, TL;DR: Deep is technically invalid (like, deeprecated :p)
For more info refer: The use of /deep/ and >>> in Angular 2
Now, to change the color of mat-progress bar,
Head over to your styles.scss file (or the main css/scss file in your project)
Add this class -->
.green-progress .mat-progress-bar-fill::after {
background-color: green !important;
}
Your mat-progress should use the above class, like -->