小编Adi*_*tya的帖子

无法将 ng-bootstrap 与 angular 9 一起使用

这是我的 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)

carousel ng-bootstrap angular9

4
推荐指数
1
解决办法
3349
查看次数

标签 统计

angular9 ×1

carousel ×1

ng-bootstrap ×1