(value: string, oldUrl: string)
| 77 | } |
| 78 | |
| 79 | private setHash(value: string, oldUrl: string) { |
| 80 | if (this.hash === value) { |
| 81 | // Don't fire events if the hash has not changed. |
| 82 | return; |
| 83 | } |
| 84 | (this as Writable<this>).hash = value; |
| 85 | const newUrl = this.url; |
| 86 | queueMicrotask(() => |
| 87 | this._hashUpdate.next({ |
| 88 | type: 'hashchange', |
| 89 | state: null, |
| 90 | oldUrl, |
| 91 | newUrl, |
| 92 | } as LocationChangeEvent), |
| 93 | ); |
| 94 | } |
| 95 | |
| 96 | replaceState(state: any, title: string, newUrl: string): void { |
| 97 | const oldUrl = this.url; |