Real World Angular - Part 2: It’s a Material World!
Akshay Nihalaney

Thks for your work. It is very helpful. With customize theme i have some problems. Maybe others will help save a time:

In file: rwa-trivia.theme.scss at this moment need write

@import ‘~@angular/material/_theming.scss’;

// Include the base styles for Angular Material core.

@include mat-core();

And all “mt-” replace to “mat-”

But i can’t fix problem with compile sccs to css

— “ERROR in ./~/css-loader?{“sourceMap”:false,”importLoaders”:1}!./~/postcss-loader?{“ident”:”postcss”}!./~/@angular/cli/~/sass-loader/lib/loader.js?{“sourceMap”:false,”precision”:8,”includePaths”:[]}!./src/rwa-trivia.theme.scss
Module build failed: 
 $opacity: if($opacity == null, opacity($color), $opacity);
 Argument `$color` of `opacity($color)` must be a color

 node_modules/@angular/material/_theming.scss:1107, in function `opacity`
 node_modules/@angular/material/_theming.scss:1107, in function `if`
 node_modules/@angular/material/_theming.scss:1107, in function `mat-color`
 node_modules/@angular/material/_theming.scss:1828, in mixin `mat-button-theme`
 node_modules/@angular/material/_theming.scss:3499, in mixin `angular-material-theme`
 in /home/dan/ng-projects/rwa-trivia/node_modules/@angular/material/_theming.scss (line 1107, column 34)
 @ ./src/rwa-trivia.theme.scss 4:14–225
 @ multi ./src/rwa-trivia.theme.scss ./src/styles.scss”

I just replace in @function mt-app-theme

line “ background: $mat-light-theme-background”

and after compile success

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.