4

The mat-core() mixin is not getting recognized by my scss file. It shows error as "Undeclared mixin".

@import '~@angular/material/_theming';
@include mat-core();
10
  • which version of material ? Commented Sep 7, 2017 at 12:41
  • @angular/[email protected] @Faisal Commented Sep 7, 2017 at 12:54
  • are you importing another pre-built theme as well ? Commented Sep 7, 2017 at 12:54
  • No i tried using it, but removed it altogether ! Commented Sep 7, 2017 at 12:56
  • use @angular/[email protected] Commented Sep 7, 2017 at 12:59

2 Answers 2

4

after couple of hrs spending i finally figured it out instead of this

@import '~@angular/material/theming';

USE THIS

@import '../node_modules/@angular/material/theming';

(Issue is with the path) :)

Sign up to request clarification or add additional context in comments.

Comments

0

Update your angular/cli version and give proper path value for importing angular theme in first line. It solved the problem

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.