簡體   English   中英

如何讓角度識別星雲主題

[英]How to make angular recognize Nebular Theme

我有一個新生成的 angular 10 項目。 我從 akveo 添加了 angular nebular 主題,但 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": []
          },

登錄模塊(自定義組件):

@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>

這是我的登錄使用的 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