Angular Material Design with ionic 3 : theme colou

2019-08-19 10:05发布

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

seeing this result when i run 'ionic serve'

Any solution?

1条回答
你好瞎i
2楼-- · 2019-08-19 10:51

Add the below line in styles.css

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

and also in pollyfills.ts add

import 'hammerjs';
查看更多
登录 后发表回答