How to use _mat-tabs-background() sass mixin in Angular Material 2 -


how use _mat-tabs-background() mixin availabel in angular material 2? here custom theme mdtab

/* import custom input theme file can call custom-input-theme function */ @import './components/header/header-links/app-header-links-component-theme.scss';  // sure ever include mixin once! @include mat-core();  @include _mat-tabs-background(#ff0000); 

here error message...

error in ./node_modules/css-loader?{"sourcemap":false,"importloaders":1}!./node_modules/postcss-loader?{"ident":"postcss"}!./node_modules/sass-loader/lib/loader.js?{"sourcemap":false,"preci sion":8,"includepaths":[]}!./src/app/app.theme.scss module build failed:  undefined          ^       argument `$map` of `map-get($map, $key)` must map  backtrace:         node_modules/@angular/material/_theming.scss:1107, in function `map-get`         node_modules/@angular/material/_theming.scss:1107, in function `mat-color`         node_modules/@angular/material/_theming.scss:3293, in mixin `-mat-tabs-background`         stdin:16       in d:\my_projects\hzone_web\final project\hardware-zone 1.1\node_modules\@angular\material\_theming.scss (line 1107, column 11) error:  undefined          ^       argument `$map` of `map-get($map, $key)` must map 

you're not supposed use private theming source code. instead, use this:

styles.scss (or whatever filename is):

@include mat-tabs-theme($theme); // theme 

then, can use backgroundcolor input on md-tab (only available if installed 2.0.0-beta.10 , above):

<md-tab-group>     <md-tab label="one" backgroundcolor="primary"> <!-- can accent/ warn -->         content here     </md-tab>     <md-tab label="two" backgroundcolor="accent"> <!-- can accent/ warn -->         content here     </md-tab> </md-tab-group> 

Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -