import { NgModule } from '@angular/core' ; import { NgReduxModule , NgRedux , DevToolsExtension } from '@angular-redux/store' ; import { NgReduxRouterModule , NgReduxRouter } from '@angular-redux/router' ; import { provideReduxForms } from '@angular-redux/form' ; import { createLogger } from 'redux-logger' ; import { IAppState } from './model' ; import { rootReducer } from './reducers' ; import { RootEpics } from './epics' ; @ NgModule ( { imports : [ NgReduxModule , NgReduxRouterModule ] , providers : [ RootEpics ] } ) export class StoreModule { constructor ( public store , devTools , ngReduxRouter , rootEpics ) { store . configureStore ( rootReducer , { } , [ createLogger ( ) , ... rootEpics . createEpics ( ) ] , devTools . isEnabled ( ) ? [ devTools . enhancer ( ) ] : [ ] ) ; if ( ngReduxRouter ) { ngReduxRouter . initialize ( ) ; } provideReduxForms ( store ) ; } }