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
See original GitHub issueHi! Ciao! How Are You???
Bug, feature request, or proposal:
Could not find Angular Material core theme, although all core @include mat-core();
is included. I got 6 themes, all working except the warning.
What is the expected behavior?
No warning.
What is the current behavior?
Warning.
What are the steps to reproduce?
git clone https://github.com/patrikx3/corifeus-app-web-pages.git
cd corifeus-app-web-pages
yarn install
grunt run
See.
What is the use-case or motivation for changing an existing behavior?
Themes.
Which versions of Angular, Material, OS, browsers are affected?
Current.
Is there anything else we should know?
Nope.
Issue Analytics
- State:
- Created 6 years ago
- Comments:36 (10 by maintainers)
Top Results From Across the Web
Angular material Could not find Angular Material core theme
1) Import this (or other) Material theme into your main css file: @import "../node_modules/@angular/material/prebuilt-themes/deeppurple-amber.
Read more >Fixing Could not find Angular Material core theme error in ...
To fix “Could not find Angular Material core theme” error in Angular material import or add any of the below prebuilt themes (or...
Read more >Could not find Angular Material core theme [Solved] - YouTube
In this video i will show you how resolve Could not find Angular Material core theme problem which many developer face while working...
Read more >angular/material2 - Gitter
Most Material components may not work as expected. For more info refer to the theming guide: https://material.angular.io/guide/theming.
Read more >Theming Angular Material
Angular Material comes prepackaged with several pre-built theme css files. These theme files also include all of the styles for core (styles common...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This issue tied me in knots, but eventually, I realised that what Angular’s own Materials tutorial doesn’t tell us is that we must include this line in the “styles.css” file, to make the controls appear normally (certainly in Windows 7).
@import “…/node_modules/@angular/material/prebuilt-themes/deeppurple-amber.css”;
Trying to include that file using an “include”, even in the index.html file, failed miserably for me. It could never locate this .css file… even if I manually copied it into the same folder as index.html.
@sharpevo thanks a lot for your help. I had the issue when running tests using karma. Your fix does not work for this use case, however adding the theme file in karma.conf.js as follows fixes the issue