0
我正在使用md-tabs并希望将背景颜色从默认浅灰色设置为白色。在我的模块,我定义的:
var module = angular.module('myMod', ['ngMaterial']);
module.config(function ($mdThemingProvider) {
$mdThemingProvider.backgroundPalette('white');
});
当我开始我的申请,我得到以下错误:
Uncaught Error: [$injector:modulerr] Failed to instantiate module myMod due to:
TypeError: $mdThemingProvider.backgroundPalette is not a function
我采用了棱角分明材料1.1.5版本。
有关此错误发生的原因的任何想法?提前Thanx。
我也试过,但后来我得到了错误“未捕获TypeError:无法读取未定义的属性'600'。显然,我必须先定义白色。那可能吗? – YourReflection
似乎白色不是预先定义的颜色之一,所以看起来很可能 –
https://material.angularjs.org/latest/Theming/03_configuring_a_theme似乎有你在之后的信息 –