0

In my angular 4 project I want to include one of Angular Material's prebuilt themes globally, so in my styles.css I put this import like explained in the angular.io: @import "~@angular/material/prebuilt-themes/indigo-pink.css"; And in my angular.cli: "styles": ["styles.css"]. My styles.css file have only that line and nothing else.

But for some reasons it seems that styles.css is not loaded. Do I need to do something else? Why this happening?

2 Answers 2

1

Add the styles in your angular-cli

"styles": ["styles.css",
           "@angular/material/prebuilt-themes/indigo-pink.css"]
Sign up to request clarification or add additional context in comments.

Comments

0

Add the styles in the angular cli as mentioned above it will also bundled and optimised into single file

1 Comment

As mentioned by @Eliseo Add the styles in your angular-cli "styles": ["styles.css", "@angular/material/prebuilt-themes/indigo-pink.css"]

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.