带有离子3的角材料设计:主题颜色不起作用 [英] Angular Material Design with ionic 3 : theme colour not works
本文介绍了带有离子3的角材料设计:主题颜色不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我只需遵循此,即可将Angular Material集成到Ionic 3应用程序中.一切都好.我现在可以将所有物质元素包含在离子应用程序中,但是主题颜色不起作用.
I just follow this to integrate Angular Material into the Ionic 3 app. Everything is fine. I can include all the material element in ionic app now but the theme colour is not working.
以下是我的package.json配置:
Below is my package.json configuration:
"@angular/animations": "5.2.4",
"@angular/cdk": "5.2.4",
.
.
"@angular/core": "5.2.11",
"@angular/forms": "5.2.11",
"@angular/http": "5.2.11",
"@angular/material": "5.2.4",
.
.
"hammerjs": "2.0.8",
"ionic-angular": "3.9.2",
"ionicons": "3.0.0",
有解决方案吗?
推荐答案
在styles.css中添加以下行
Add the below line in styles.css
@import "~@angular/material/prebuilt-themes/indigo-pink.css";
,也可以在pollyfills.ts中添加
and also in pollyfills.ts add
import 'hammerjs';
这篇关于带有离子3的角材料设计:主题颜色不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文