mirror of
https://github.com/richard-loafle/fuse-angular.git
synced 2025-01-11 04:55:07 +00:00
32 lines
975 B
TypeScript
32 lines
975 B
TypeScript
|
import { StoreDevtoolsModule } from '@ngrx/store-devtools';
|
||
|
import { EffectsModule } from '@ngrx/effects';
|
||
|
import { MetaReducer, StoreModule } from '@ngrx/store';
|
||
|
import { NgModule } from '@angular/core';
|
||
|
import { storeFreeze } from 'ngrx-store-freeze';
|
||
|
import { environment } from '../../environments/environment';
|
||
|
import { RouterStateSerializer, StoreRouterConnectingModule } from '@ngrx/router-store';
|
||
|
import { reducers, effects, CustomSerializer } from './index';
|
||
|
|
||
|
export const metaReducers: MetaReducer<any>[] = !environment.production
|
||
|
? [storeFreeze]
|
||
|
: [];
|
||
|
|
||
|
@NgModule({
|
||
|
imports : [
|
||
|
StoreModule.forRoot(reducers, {metaReducers}),
|
||
|
EffectsModule.forRoot(effects),
|
||
|
!environment.production ? StoreDevtoolsModule.instrument() : [],
|
||
|
StoreRouterConnectingModule
|
||
|
],
|
||
|
providers: [
|
||
|
{
|
||
|
provide : RouterStateSerializer,
|
||
|
useClass: CustomSerializer
|
||
|
}
|
||
|
]
|
||
|
})
|
||
|
|
||
|
export class AppStoreModule
|
||
|
{
|
||
|
}
|