Importing Angular Material in Stackblitz

2019-07-18 21:16发布

I have imported material(7.2.1) in my stackblitz link,

Still I am unable see the exact UI of material

I have tried to figure out, but no result. Here the stackblitz which i have created.

1条回答
你好瞎i
2楼-- · 2019-07-18 22:12

Angular Material lets you know what the issue is in the console:

Could not find Angular Material core theme. Most Material components may not work as expected. For more info refer to the theming guide: https://material.angular.io/guide/theming

You are not importing a core theme from Angular Material. Add this line to your styles.css:

@import '@angular/material/prebuilt-themes/deeppurple-amber.css';

See this link in the official documentation.

查看更多
登录 后发表回答