这段代码非常适合在我的整个应用程序中使用angular14定制字体
@use '@angular/material' as mat;
@import '@angular/material/theming';
$my-typography: mat-typography-config($font-family: "Lato, sans-serif");
@include mat.core($my-typography);
将角形材料& cdk更新为15时,此错误持续发生:
Error: Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):
HookWebpackError: Module build failed (from ./node_modules/sass-loader/dist/cjs.js):
SassError: Only 0 arguments allowed, but 1 was passed.
┌──> src\app\core\sass\cecom-theme.scss
11│ @include mat.core($my-typography);
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ invocation
╵
┌──> node_modules\@angular\material\core\_core.scss
8 │ @mixin core() {
│ ━━━━━━ declaration
╵
src\app\core\sass\cecom-theme.scss 11:1 core()
src\app\core\sass\cecom-theme.scss 11:1 root stylesheet
已尝试ng generate @angular/material:mdc-migration
,但未检测到该文件存在任何问题。
1条答案
按热度按时间ddrv8njm1#
材料芯在材料Angular 15中没有任何参数
只能这样称呼它
@include mat.core();
在主题定义过程中,您需要将排版配置与主调色板和强调调色板沿着传递