Urigo / angular-meteor

Angular and Meteor - The perfect stack

Home Page:https://www.angular-meteor.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Angular Material design not loading theme stylesheet

mattiLeBlanc opened this issue · comments

Hi,

Checkout my repo:
https://github.com/mattiLeBlanc/angular-meteor-build-issue

As mentioned, I load the indigo theme in my app.scss, but the mat-formfield is not loading correctly.
I can see that it couldn't import the stylesheet, but it is not giving an error in my console:
image

I have tried putting the import in main.scss but then I get Mime type errors and the file can't be loaded.

Any idea what is going on?

@ardatan
Solved it.
Don't use:
@import '@angular/material/prebuilt-themes/indigo-pink.css'
but use
@import '@angular/material/prebuilt-themes/indigo-pink';
Add this into your main.scss file.

This is probably something that should be looked at?
If you use the .css extension you end up getting this error in console;
Resource interpreted as Stylesheet but transferred with MIME type text/html: "http://localhost:3000/client/@angular/material/prebuilt-themes/indigo-pink.css".

Thanks, this helped me alot. :)

@ardatan
Solved it.
Don't use:
@import '@angular/material/prebuilt-themes/indigo-pink.css'
but use
@import '@angular/material/prebuilt-themes/indigo-pink';
Add this into your main.scss file.

This is probably something that should be looked at?
If you use the .css extension you end up getting this error in console;
Resource interpreted as Stylesheet but transferred with MIME type text/html: "http://localhost:3000/client/@angular/material/prebuilt-themes/indigo-pink.css".