mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
fix(router): eagerly update internal state on browser-triggered navigations (#43102)
The management of `browserUrlTree` currently has several problems with correctly tracking the actual state of the browser. This change makes the Router eagerly update the `browserUrlTree` when handling navigations triggered by browser events (i.e., not 'imperative'). This is because with those types of navigations, the browser URL bar is _already_ updated. If we do not update the internal tracking of the `browserUrlTree`, we will be out of sync with the real URL if the navigation is rejected. It would be best if we could remove `browserUrlTree` completely, but doing that would require a lot more investigation and is blocked by #27059 because the SpyLocation used in tests does not emulate real browser behavior. fixes #43101 PR Close #43102
This commit is contained in:
@@ -1526,6 +1526,9 @@
|
||||
{
|
||||
"name": "isArrayLike"
|
||||
},
|
||||
{
|
||||
"name": "isBrowserTriggeredNavigation"
|
||||
},
|
||||
{
|
||||
"name": "isCommandWithOutlets"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user