I am using the new ngrx 5. This is the file that holds the reducers and the featureSelector:
import AppState from '../interfaces/app.state'
import { ActionReducerMap, createFeatureSelector } from '@ngrx/store'
import { partnerReducer } from './partner.reducer'
export const reducers: ActionReducerMap<AppState> = {
partnerState: partnerReducer
}
export const getAppState = createFeatureSelector<AppState>('appState')
This is how I am importing the storeModule
@NgModule({
declarations: [...],
imports: [...
RouterModule.forRoot(ROUTES),
StoreModule.forFeature('appState', reducers)
],
providers: [...],
bootstrap: [AppComponent],
entryComponents: [...]
})
export class AppModule { }
I have followed this tutorial
When I run the app, I get the following error:
"StaticInjectorError(AppModule)[StoreFeatureModule -> ReducerManager]:
\n StaticInjectorError(Platform: core)[StoreFeatureModule -> ReducerManager]:
\n NullInjectorError: No provider for ReducerManager!"
But if I do provide ReducerManager in the providers, I get this error:
No provider for ReducerManagerDispatcher!