For "theming your custom components," I'm getting a "include" is not a known '@' directive error.

271 views
Skip to first unread message

Dianne Asis

unread,
Dec 13, 2016, 12:27:55 PM12/13/16
to angular-material2
Just following Angular Material 2's Getting Started Guide and theming your custom components instructions. In my src/styles.scss file, I added:

/* You can add global styles to this file, and also import other style files */
@import "~@angular/material/core/theming/prebuilt/deeppurple-amber.css";
@import "themes/candy-carousel/candy-carousel-theme.scss";

/*Using the $theme variable from the pre-built theme you can call the theming function*/
@include candy-carousel-theme($theme);

And I'm getting a "include" is not a known '@' directive error. I'm not familiar with SASS and @mixin so it's highly possible that I did not install @mixin properly.

I've tried npm install node-sass sass-loader raw-loader --save-dev Then installed npm install mixin but I don't know if this is the correct one to install to make it work. Would anyone be able to point me in the right direction?
I've added this in stackoverflow since this might not be an actual angular-material2 issue.
Thanks in advance for your help!

Michael Prentice

unread,
Apr 16, 2017, 2:04:21 AM4/16/17
to angular-material2
This is an issue with your build tooling configuration and not Angular Material.

You need to specify if you are using Angular CLI, Webpack, or something else. It also looks like this error may be related to the configuration of your IDE.

Michael Prentice
Reply all
Reply to author
Forward
0 new messages