我正在将一个现有项目从角度5移动到角度6,我遇到了这个错误:
Uncaught Error: Provider parse errors:
Cannot instantiate cyclic dependency! ErrorHandler ("[ERROR ->]"): in NgModule
AppModule in ./AppModule@-1:-1
我不知道如何确定循环依赖性。
这里是AppModule
@NgModule({
declarations: [
AppComponent
],
imports: [
SharedModule,
DialogModule,
StoreModule.forRoot(allReducers),
EffectsModule.forRoot([DossierEffects]),
StoreDevtoolsModule.instrument({
maxAge: 5
}),
AppRoutingModule,
DashboardModule
],
providers: [
{
provide: ErrorHandler,
useClass: GlobalErrorHandler
},
MessageService,
UserService,
DossierService,
FavouriteService,
SettingsService,
ApplicationInfoService,
StoreService,
PermissionsService,
DeadlineService
],
bootstrap: [AppComponent]
})
export class AppModule {}