* 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)
| 185 | * @param state Location history state. |
| 186 | */ |
| 187 | replaceState(path: string, query: string = '', state: any = null): void { |
| 188 | this._locationStrategy.replaceState(state, '', path, query); |
| 189 | this._notifyUrlChangeListeners( |
| 190 | this.prepareExternalUrl(path + normalizeQueryParams(query)), |
| 191 | state, |
| 192 | ); |
| 193 | } |
| 194 | |
| 195 | /** |
| 196 | * Navigates forward in the platform's history. |