import { RouterStateSerializer } from '@ngrx/router-store' ; import { Params , RouterStateSnapshot } from '@angular/router' ; interface MyRouterState { url : string ; queryParams : Params ; } export class MyRouterSerializer implements RouterStateSerializer < MyRouterState > { serialize ( routerState ) { const { url , root : { queryParams } } = routerState ; return { url , queryParams } ; } }