ng2searchpipemodule

myzjeezk  于 2021-06-30  发布在  Java
关注(0)|答案(1)|浏览(369)
import { NgModule } from '@angular/core';

import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { Ng2SearchPipeModule } from 'ng2-search-filter';

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    AppRoutingModule,
    Ng2SearchPipeModule
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }

intellij给我的信息是“ng2searchpipemodule类不是Angular 模块”。有办法解决这个问题吗?

1tuwyuhd

1tuwyuhd1#

检查ng2searchpipemodule是否有合适的装饰器。它必须是ngmodule,就像你的app module一样。

@NgModule({
  declarations: [
    ...
  ],
  imports: [
    ...
  ],
  providers: [],
})
export class Ng2SearchPipeModule { }

另外,检查导入路径是否正确

相关问题