我想在我的 MEAN 堆栈应用程序中使用 Angular Material,但出现以下错误:
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
在我的 Angular CLI 应用程序中,我设法使用 Angular Material ,但对于这个应用程序,我似乎无法让它工作。这可能是因为应用程序的结构:
正如您在图像上看到的那样,我尝试使用@import 语句。在主页上我放了一个复选框 Material item(这里命名为 jjjjjj),但是你可以看到它没有主题所以看起来不太好。
最佳答案
我有同样的问题,对我来说它可以尝试添加这一行:
@import "~@angular/material/prebuilt-themes/indigo-pink.css";
您可以在这里选择您想要应用的主题 Material theme
关于javascript - 应用程序无法加载 Angular Material 主题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49301639/