Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/database/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
将Angular material升级到版本6后的排版配置问题_Angular_Angular Material_Angular6_Angular Material 5 - Fatal编程技术网

将Angular material升级到版本6后的排版配置问题

将Angular material升级到版本6后的排版配置问题,angular,angular-material,angular6,angular-material-5,Angular,Angular Material,Angular6,Angular Material 5,将Angle material更新到版本6后,所有标题元素(h1-h6)的字体系列和字体大小都不正确 这是我的自定义配置: $custom-typography: mat-typography-config( $font-family: 'Roboto, sans-serif', // Large, one-off headers, usually at the top of the page. $display-4: mat-typography-level(1

将Angle material更新到版本6后,所有标题元素(h1-h6)的字体系列和字体大小都不正确

这是我的自定义配置:

$custom-typography: mat-typography-config(
    $font-family: 'Roboto, sans-serif',
    // Large, one-off headers, usually at the top of the page.
    $display-4:     mat-typography-level(112px, 112px, 300),
    $display-3:     mat-typography-level(56px, 56px, 400),
    $display-2:     mat-typography-level(45px, 48px, 400),
    $display-1:     mat-typography-level(34px, 40px, 400),
    // h1
    $headline:      mat-typography-level(24px, 32px, 400),
    // h2
    $title:         mat-typography-level(20px, 32px, 500),
    // h3
    $subheading-2:  mat-typography-level(16px, 28px, 400),
    // h4
    $subheading-1:  mat-typography-level(15px, 24px, 400),
    // Bolder body text.
    $body-2:        mat-typography-level(14px, 24px, 500),
    // Base body text.
    $body-1:        mat-typography-level(18px, 20px, 400),
    // Smaller body and hint text.
    $caption:       mat-typography-level(12px, 20px, 400),
    // Buttons and anchors.
    $button:        mat-typography-level(18px, 14px, 300),
    // Line-height must be unit-less fraction of the font-size.
    $input:         mat-typography-level(18px, 1.2, 300)
);

@include mat-core($custom-typography);

我的问题是缺少
mat排版
类。 当我升级到angular 6时,我创建了一个新项目,然后我只是一个接一个地复制模块,修复升级后所需的一切。
我刚通过
index.hml
文件,忘记将
mat排版
类添加到
body
元素

您添加了
mat排版
类了吗?@Edric我忘了,这是我的错误,谢谢您的回答。