MCPcopy Index your code
hub / github.com/angular/angular / replaceState

Method replaceState

packages/common/src/location/location.ts:181–187  ·  view source on GitHub ↗

* Changes the browser's URL to a normalized version of the given URL, and replaces * the top item on the platform's history stack. * * @param path URL path to normalize. * @param query Query parameters. * @param state Location history state.

(path: string, query: string = '', state: any = null)

Source from the content-addressed store, hash-verified

179 * @param state Location history state.
180 */
181 replaceState(path: string, query: string = '', state: any = null): void {
182 this._locationStrategy.replaceState(state, '', path, query);
183 this._notifyUrlChangeListeners(
184 this.prepareExternalUrl(path + normalizeQueryParams(query)),
185 state,
186 );
187 }
188
189 /**
190 * Navigates forward in the platform's history.

Callers 5

browserUrlMethod · 0.45
setBrowserUrlMethod · 0.45

Implementers 1

SpyLocationpackages/common/testing/src/location_m

Calls 3

prepareExternalUrlMethod · 0.95
normalizeQueryParamsFunction · 0.90

Tested by 1