简体   繁体   English

如何让角度识别星云主题

[英]How to make angular recognize Nebular Theme

I have a angular 10 project freshly generated.我有一个新生成的 angular 10 项目。 I added angular nebular theme from akveo, but the themes are not recognized by Angular.我从 akveo 添加了 angular nebular 主题,但 Angular 无法识别这些主题。

I copied a code example for a card from akveos page but it only shows as a text.我从 akveos 页面复制了一张卡片的代码示例,但它只显示为文本。 I do not get any errors or whatsoever.我没有收到任何错误或任何错误。

This is my code in my opnion I added everything I need in the right places but maybe I am mistaken.这是我在我的选项中的代码我在正确的地方添加了我需要的一切,但也许我错了。 Would be nice if someone would look at it.要是有人看就好了。

Angular.json:角度.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(Custom Component):登录模块(自定义组件):

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

LoginComponent-html登录组件-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>

Here is my scss which login uses:这是我的登录使用的 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';

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM