在Stackblitz中导入Angular Material

5
I have imported material(7.2.1) into my stackblitz link, but I am still unable to see the exact UI of material. I have tried to figure it out, but with no result. Here is the stackblitz that I have created.
1个回答

8

Angular Material会在控制台中告诉你问题所在:

找不到Angular Material核心主题。大多数Material组件可能无法按预期工作。更多信息请参考主题指南:https://material.angular.io/guide/theming

您未从Angular Material导入核心主题。将此行添加到styles.css中:

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

请参阅官方文档中的this链接。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接