更新时间:2023-01-25 19:11:16
您必须将主题导入到全局css或sass文件中:
You have to import a theme into your global css or sass file:
@import "~@angular/material/prebuilt-themes/indigo-pink.css";
或将其包含在您的index.html
文件中:
or alternatively include it in your index.html
file:
<link href="node_modules/@angular/material/prebuilt-themes/indigo-pink.css" rel="stylesheet">
就像已经提到的主题文档一样,Angular Material提供了以下预先构建的主题:
As in the theming documentation already mentioned Angular Material provides the following pre-built themes:
您必须包括以下主题之一,或者创建自己的自定义主题.
You have to include one of these themes or you create your own custom theme.