【问题标题】:Styles.scss is not Being Applied Correctly Angular 8Styles.scss 未正确应用 Angular 8
【发布时间】:2020-09-25 21:23:42
【问题描述】:

我正在使用这个mondal/org-chart 并运行angular 8.3.26。我有数据渲染,但没有应用 sass 样式。它应该看起来像这样:example

我运行了这个命令:ng config schematics.@schematics/angular:component.styleext scss并在文件 styles.scss 中添加了 @import "~@mondal/org-chart/_theming.scss";

在我目前拥有的组件中:

@Component({
   selector: 'testOrg.component',
   templateUrl: './testOrg.component.html',       
}) 

为了应用正确的样式,我缺少什么?

【问题讨论】:

    标签: angular sass


    【解决方案1】:

    您是否在 app.module.ts 文件中添加了此代码?导入 OrgChart 并将其添加到“imports”数组中。

    import { OrgChartModule } from '@mondal/org-chart';
    

    【讨论】:

      猜你喜欢
      • 2020-04-04
      • 1970-01-01
      • 1970-01-01
      • 2023-03-27
      • 2018-12-31
      • 1970-01-01
      • 2020-12-31
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多