Advertisement
ZioBizio

core.module.ts

Apr 13th, 2020
502
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import { NgModule } from '@angular/core';
  2. import { CommonModule } from '@angular/common';
  3. import { StoreModule } from '@ngrx/store';
  4. import { StoreDevtoolsModule } from '@ngrx/store-devtools';
  5. import { routerReducer, RouterState, StoreRouterConnectingModule } from '@ngrx/router-store';
  6.  
  7. @NgModule({
  8.   declarations: [],
  9.   imports: [
  10.     CommonModule,
  11.     StoreModule.forRoot(
  12.       {
  13.         auth: () => ({token: 'ciao'}),
  14.         profile: () => 'Maurizio Nardi',
  15.         router: () => routerReducer
  16.       },
  17.       {
  18.         runtimeChecks: {
  19.           strictActionImmutability: true,
  20.           strictActionSerializability: true,
  21.           strictStateImmutability: true,
  22.           strictStateSerializability: true
  23.         }
  24.       }
  25.     ),
  26.     StoreDevtoolsModule.instrument({
  27.       maxAge: 25
  28.     }),
  29.     StoreRouterConnectingModule.forRoot({
  30.       routerState: RouterState.Minimal
  31.     }),
  32.   ]
  33. })
  34. export class CoreModule { }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement