Using
@angular/material 2.0.0-beta.2
webpack 2.3.0
sass-loader 6.0.0
postcss-loader 1.3.0
I get a build error:
Module build failed:
@include md-core();
^
No mixin named md-core
Backtrace:
stdin:7
in R:\fb_wp\sass\angular-material.scss (line 7, column 10)
@ ./sass/angular-material.scss 4:14-174
Try using mat-core instead.
After the release '2.0.0-beta.2', some prefixes replaced with _md-_ to _mat-_
For example:
Old theming guide code
@import '~@angular/material/core/theming/all-theme';
@include md-core();
$candy-app-primary: md-palette($md-indigo);
$candy-app-accent: md-palette($md-pink, A200, A100, A400);
$candy-app-warn: md-palette($md-red);
$candy-app-theme: md-light-theme($candy-app-primary, $candy-app-accent, $candy-app-warn);
@include angular-material-theme($candy-app-theme);
The same code after release '2.0.0-beta.2'
@import '@angular/material/core/theming/all-theme';
@include mat-core;
$candy-app-primary: mat-palette($mat-indigo);
$candy-app-accent: mat-palette($mat-pink, A200, A100, A400);
$candy-app-warn: mat-palette($mat-red);
$candy-app-theme: mat-light-theme($candy-app-primary, $candy-app-accent, $candy-app-warn);
@include angular-material-theme($candy-app-theme);
Sorry, this was my mistake. I hadn't updated the scss code that I got from https://github.com/angular/material2/blob/master/guides/theming.md
Everything works now when using the updated code from the link above. And yes, the solution was to exchange the 'md-' prefix to 'mat-'.
Thanks all for your help!
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
_This action has been performed automatically by a bot._
Most helpful comment
Try using
mat-coreinstead.