Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
public persistState(filtersService: RTFiltersService): void {
const newState = {};
Object.assign(newState, filtersService.getRequestState());
const params = cloneAsLiteral(this.router.routerState.root.snapshot.queryParams || {});
params[this.serializationKey] = JSON.stringify(newState);
let path = this.location.path(true);
path = path.indexOf('?') === -1 ? path : path.substring(0, path.indexOf('?'));
this.location.replaceState(path, this.serializeQueryParams(params));
}
public getState(): object {