fix(router): navigating to the current location works (#19463)
Closes #13340 PR Close #19463
This commit is contained in:

committed by
Chuck Jazdzewski

parent
1c77cdadaf
commit
b67d574a95
@ -41,7 +41,9 @@ export class SpyLocation implements Location {
|
||||
return currPath == givenPath + (query.length > 0 ? ('?' + query) : '');
|
||||
}
|
||||
|
||||
simulateUrlPop(pathname: string) { this._subject.emit({'url': pathname, 'pop': true}); }
|
||||
simulateUrlPop(pathname: string) {
|
||||
this._subject.emit({'url': pathname, 'pop': true, 'type': 'popstate'});
|
||||
}
|
||||
|
||||
simulateHashChange(pathname: string) {
|
||||
// Because we don't prevent the native event, the browser will independently update the path
|
||||
|
Reference in New Issue
Block a user