Angular Material Design with ionic 3 : theme colour not works

断了今生、忘了曾经 提交于 2019-12-11 17:31:42

问题


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.

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",

Any solution?


回答1:


Add the below line in styles.css

@import "~@angular/material/prebuilt-themes/indigo-pink.css";

and also in pollyfills.ts add

import 'hammerjs';


来源:https://stackoverflow.com/questions/55015983/angular-material-design-with-ionic-3-theme-colour-not-works

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!