* 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)
| 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. |