angularjs - Angular material theme stays default -


no matter h1 color stay white , without background color, here code:

<div ng-app="testapplication">     <md-toolbar>         <h1 class="md-primary">hello world</h1>     </md-toolbar> </div> 

javascript:

var app = angular.module('testapplication', ['ngmaterial']); app.config(function($mdthemingprovider) {   $mdthemingprovider.theme('default')     .primarypalette('red')     .accentpalette('yellow'); }); 

codepen

i'm using : angular - v1.4.8 angular material - v1.0.2

thanks guys

you can define theme directive. in case if want override child element color use css.

h1{   color: red; } 
<div ng-app="testapplication" ng-cloak>   <md-toolbar class="md-accent">     <h1> hello world </h1>   </md-toolbar> </div> 

Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -