首页 > 解决方案 > 如何使角度识别星云主题

问题描述

我有一个新生成的 Angular 10 项目。我从 akveo 添加了角度星云主题,但 Angular 无法识别这些主题。

我从 akveos 页面复制了一张卡片的代码示例,但它只显示为文本。我没有收到任何错误或任何错误。

这是我在我的选项中的代码我在正确的地方添加了我需要的一切,但也许我弄错了。如果有人会看它会很好。

角.json:

 ],
            "styles": [
              "apps/moniesta-admin/src/styles.scss",
              "node_modules/@nebular/theme/styles/prebuilt/default.css",
              "node_modules/@nebular/theme/styles/prebuilt/dark.css",
              "node_modules/@nebular/theme/styles/prebuilt/corporate.css",
              "node_modules/@nebular/theme/styles/prebuilt/cosmic.css"
            ],
            "scripts": []
          },

LoginModule(自定义组件):

@NgModule({
  imports: [CommonModule, 
    RouterModule, 
    NbCardModule, 
    NbThemeModule.forRoot(), 
    NbLayoutModule],
  declarations: [LoginComponent],
  exports: [LoginComponent],
})

登录组件-html

<nb-card status="success">
  <nb-card-header>Nebula</nb-card-header>
  <nb-card-body>
    A nebula is an interstellar cloud of dust, hydrogen, helium and other ionized gases.
    Originally, nebula was a name for any diffuse astronomical object,
    including galaxies beyond the Milky Way.
  </nb-card-body>
  <nb-card-footer>By Wikipedia</nb-card-footer>
</nb-card>

标签: angulartypescriptweb-applications

解决方案


这是我登录使用的scss:

@import '~@nebular/theme/styles/theming';
@import '~@nebular/theme/styles/themes/default';
@import '~@nebular/theme/styles/themes/dark';
@import '~@nebular/theme/styles/themes/cosmic';
@import '~@nebular/theme/styles/themes/corporate';

推荐阅读