How to use the right-angled.cloneAsLiteral function in right-angled

To help you get started, we’ve selected a few right-angled 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 eastbanctechru / right-angled / projects / right-angled-demo / src / app / shared / state-services / query-string-state.service.ts View on Github external
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 {