0

I have been checking out Angular material in my Angular CLI project and find it to be extremely useful.

Now, I have another MEAN stack project where I would like to use Angular Material. One of the steps needed to use Material is adding a theme to the styles.css file. I did it like this:

@import "~@angular/material/prebuilt-themes/indigo-pink.css";

Someone pointed out that import won't be recognized in my type of structure (something with webpack, see below). I also got the following error:

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

Because of the difference of the structure between my mean stack app and an Angular CLI this doesn't find the theme and thus doesn't work.

Could someone please explain me how to fix this. It would be really handy to be able to use Material in that mean stack app.

a screenshot of the structure of my MEAN stack app

enter image description here

2

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.