Bug
No warning.
Warning is shown.
Could not find Angular Material core theme. Most Material components may not work as expected. For more info refer to the theming guide: https://material.angular.io/guide/theming.
Anyway no styles are broken.
Use @import '~@angular/material/prebuilt-themes/indigo-pink'; in app.component.scss.
Angular 4.0.1
Material 2.0.0-beta.5
Was working in Material 2.0.0-beta.2. Tried creating a custom theme, but still getting error message.
Try importing the prebuilt theme into your global stylesheet
The warning is accurate- the stylesheet is meant to be added globally, rather than in the styleUrls of a component.
I can't import it in index.html, so is there another way to do that possibly using webpack ?
Still i get this error with 5.0.0-rc.1. all components are getting displayed but the warning in the console keeps coming.
Could not find Angular Material core theme. Most Material components may not work as expected. For more info refer to the theming guide: https://material.angular.io/guide/theming
I followed all the "Get started" instructions. is there anything i am missing. I am using webpack instead of systemjs.
any thoughts
after searching i found this answer in stackoverflow and it worked for me
exports: [
MatButtonModule,
MatMenuModule,
MatToolbarModule,
MatIconModule,
MatCardModule
],
providers: [
{
provide: MATERIAL_SANITY_CHECKS,
useValue: false
}**
]
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
_This action has been performed automatically by a bot._
Most helpful comment
after searching i found this answer in stackoverflow and it worked for me
exports: [
MatButtonModule,
MatMenuModule,
MatToolbarModule,
MatIconModule,
MatCardModule
],
providers: [
{
provide: MATERIAL_SANITY_CHECKS,
useValue: false
}**
]