角材料组件具有奇怪的样式

时间:2020-08-15 14:49:26

标签: angular angular-material

我不知道为什么我的材质组件如此怪异,好像它们在我的应用程序中实现得不好。

这是幻灯片切换器

Material Slide Toggle

PurchasableType

工具提示,每次显示在我的应用底部

Tooltip

  <div
    fxFlex
    fxLayoutAlign="end center"
    fxLayout="row"
    fxLayoutGap="10px"
    class="right-header margin-right-x2"
  >
     ...
    <div fxLayout="row" fxLayoutAlign="end center" class="theme-container">
      <mat-slide-toggle (click)="toggleTheme()" [checked]="isDarkTheme">
        <mat-icon class="header-icon">highlight</mat-icon>
      </mat-slide-toggle>
    </div>
  </div>

如果您能帮助我,我将不胜感激!谢谢。

1 个答案:

答案 0 :(得分:0)

好吧,感谢@ Navitas28,我在重新安装时已经弄清楚了,我忘记了在我的styles.scss中导入mat-core()! 我的愚蠢错误。.

感谢您的答复,祝您有美好的一天!