import { Action } from '@ngrx/store' ; import { routerActions } from './actions' ; export interface RouterState { path : string ; } export const initialState = { path : '' } ; export function routerReducer ( state = initialState , action ) { switch ( action . type ) { case routerActions . UPDATE_LOCATION : return action . payload ; default : return state ; } }