How to use the @ngrx/router-store.NavigationActionTiming.PostActivation function in @ngrx/router-store

To help you get started, we’ve selected a few @ngrx/router-store examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github opfab / operatorfabric-core / ui / main / src / app / store / state.module.ts View on Github external
import {ModuleWithProviders, NgModule} from '@angular/core';
import {CommonModule} from '@angular/common';
import {StoreModule} from '@ngrx/store';
import {EffectsModule} from '@ngrx/effects';
import {appEffects, appReducer, storeConfig} from './index';
import {environment} from '@env/environment';
import {StoreDevtoolsModule} from '@ngrx/store-devtools';
import {NavigationActionTiming, RouterStateSerializer, StoreRouterConnectingModule} from '@ngrx/router-store';
import {CustomRouterStateSerializer} from '@ofStore/states/router.state';

@NgModule({
  imports: [
    CommonModule,
    StoreModule.forRoot(appReducer, storeConfig),
    StoreRouterConnectingModule.forRoot({
        navigationActionTiming: NavigationActionTiming.PostActivation,
        serializer: CustomRouterStateSerializer
    }),
    EffectsModule.forRoot(appEffects),
    !environment.production ? StoreDevtoolsModule.instrument() : [],
  ],
  declarations: [],
    providers:[{provide:'configRetryDelay',useValue:5000}]
})
export class StateModule {
  static forRoot(): ModuleWithProviders {
    return {
      ngModule: StateModule
      ,
      providers: [
        /**
         * The `RouterStateSnapshot` provided by the `Router` is a large complex structure.