【问题标题】:Error: 'ngb-tab' is not a known element. Angular 11错误:“ngb-tab”不是已知元素。角 11
【发布时间】:2021-04-04 01:02:33
【问题描述】:

我正在将我的应用程序升级到 Angular 11 并面临引导选项卡的问题

错误:“ngb-tab”不是已知元素: 如果 'ngb-tab' 是一个 Angular 组件,则验证它是该模块的一部分。

'ngb-tabset' 不是已知元素: 如果 'ngb-tabset' 是一个 Angular 组件,则验证它是该模块的一部分。

我正在使用 ng-bootstrap v8.0.0angular 11

我正在 app.modules.ts 中导入所需的模块,即

import { NgbModule } from "@ng-bootstrap/ng-bootstrap";

@NgModule({
  declarations: [AppComponent, FullLayoutComponent, ContentLayoutComponent],
  imports: [
    ......
    NgbModule,
    ........
  ],

【问题讨论】:

    标签: node.js angular ng-bootstrap angular11


    【解决方案1】:

    根据Documentation,ngb-tab & ngb-tabset 从 ng-bootstrap v8.0.0 中移除。所以我已将选项卡转换为导航指令,从而解决了我的问题

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2018-04-10
      • 2017-04-23
      • 2021-11-26
      • 2021-01-22
      • 1970-01-01
      • 2017-01-28
      • 2021-01-13
      相关资源
      最近更新 更多