<mat-toolbar color="primary">
<button
mat-icon-button
class="cursor-pointer example-icon favorite-icon"
aria-label="Example icon-button with heart icon"
(click)="dataStorerService.sidenavOpen = !dataStorerService.sidenavOpen"
>
<mat-icon>menu</mat-icon>
</button>
<span>Dashboard</span>
<span class="example-spacer"></span>
</mat-toolbar>
This is my code but the primary color was not getting reflected in the browser.
on importing the below in styles.scss file
@import '~@angular/material/prebuilt-themes/indigo-pink.css';
changes started to reflect
Reason for the issue faced:
At times while installing Angular material to the project using the command
ng add @angular/material
Choose a prebuilt theme name, or "custom" for a custom theme: (Use
arrow keys)
Indigo/Pink [ Preview: https://material.angular.io?theme=indigo-pink ] Deep Purple/Amber [
Preview: https://material.angular.io?theme=deeppurple-amber ]
Pink/Blue Grey [ Preview:
https://material.angular.io?theme=pink-bluegrey ] Purple/Green
[ Preview: https://material.angular.io?theme=purple-green ]
Custom
incase if the installing of the theme doesn't happen properly, it might result in this issue as well!