node.jsangularng-bootstrapangular11

Error: 'ngb-tab' is not a known element. Angular 11


I am upgrading my application to angular 11 and facing issue with bootstrap tab

Error: 'ngb-tab' is not a known element: If 'ngb-tab' is an Angular component, then verify that it is part of this module.

'ngb-tabset' is not a known element: If 'ngb-tabset' is an Angular component, then verify that it is part of this module.

I am using ng-bootstrap v8.0.0 and angular 11

I am importing required modules in app.modules.ts i.e

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

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

Solution

  • According to Documentation, ngb-tab & ngb-tabset removed from ng-bootstrap v8.0.0. So i have converted the tabs to nav-directives which resolved my issue