在main.module.ts
@NgModule({
declarations: [
AppComponent,
],
imports: [
BrowserModule,
AppRoutingModule,
ReactiveFormsModule,
UiLibModule,
AepBaseModule,
AuthModule,
HttpClientModule,
StoreModule.forRoot({}),
!environment.production ? StoreDevtoolsModule.instrument() : []
],
providers: [
{provide: HTTP_INTERCEPTORS, useClass: LoggingInterceptor, multi: true}
],
bootstrap: [AppComponent]
})
在auth.module.ts中,
@NgModule({
declarations: [
LoginComponent,
RegisterComponent
],
imports: [
CommonModule,
ReactiveFormsModule,
StoreModule.forFeature('auth', loginActionsReducer)
]
})
在ui.lib.module.ts中,
@NgModule({
declarations: [
LoaderComponent,
ModalComponent
],
imports: [
CommonModule,
StoreModule.forFeature('ui', uiLibReducer)
]
})
当我在一个模块中设置状态时,另一个模块的状态将被删除。我已附上以下屏幕截图,
我想念任何东西吗?