I need to be able to inject and use a angular 2 service (called SomeService
below) from the imports section of NgModule
:
...
imports: [
BrowserModule,
RouterModule.forRoot(AppRoutes, {useHash: true}),
HttpModule,
ReactiveFormsModule,
NgbModule,
StoreModule.provideStore({
currentUserAccount: someFunction(currentUserAccountReducer, someService),
authenticated: someFunction(authenticatedReducer, someService)
},
{
authenticated: false
})
],
...
I need that because I need to use a fully functional service (that depends on Http
) from a plain function (named someFunction
above) in order to rehydrate a ngrx store application.
Here someFunction
is a meta reducer.
See concept of meta reducer in ngrx store application.
Can someone please help?