这是我的 appModule,我正在使用 ng-boostsrap 轮播
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { HomeComponent } from './home/home.component';
import { NgbModule, NgbCarousel } from '@ng-bootstrap/ng-bootstrap';
@NgModule({
declarations: [
AppComponent,
HomeComponent
],
imports: [
BrowserModule,
AppRoutingModule,
NgbModule,
NgbCarousel
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
Run Code Online (Sandbox Code Playgroud)
每当我添加任何 ng-bootstrap 组件时,它都会出现以下错误,在这里我添加了轮播。
ERROR in node_modules/@ng-bootstrap/ng-bootstrap/carousel/carousel.d.ts:24:22 - error NG6002: Appears in the NgModule.imports of AppModule, but …Run Code Online (Sandbox Code Playgroud)