import { NgModule } from '@angular/core' ; import { BrowserModule } from '@angular/platform-browser' ; import { Routes , RouterModule } from '@angular/router' ; import { BrowserAnimationsModule } from '@angular/platform-browser/animations' ; import { StoreModule , MetaReducer } from '@ngrx/store' ; import { EffectsModule } from '@ngrx/effects' ; import { StoreDevtoolsModule } from '@ngrx/store-devtools' ; import { storeFreeze } from 'ngrx-store-freeze' ; const environment = { development : true , production : false , } ; export const metaReducers = ! environment . production ? [ storeFreeze ] : [ ] ; import { AppComponent } from './containers/app/app.component' ; export const ROUTES = [ { path : '' , pathMatch : 'full' , redirectTo : 'products' } , { path : 'products' , loadChildren : '../products/products.module#ProductsModule' , } , ] ; @ NgModule ( { imports : [ BrowserModule , BrowserAnimationsModule , RouterModule . forRoot ( ROUTES ) , StoreModule . forRoot ( { } , { metaReducers } ) , EffectsModule . forRoot ( [ ] ) , environment . development ? StoreDevtoolsModule . instrument ( ) : [ ] , ] , declarations : [ AppComponent ] , bootstrap : [ AppComponent ] , } ) export class AppModule { }