angular/packages/router/src
Andrew Scott 286b2807de 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
2021-08-16 09:33:23 -07:00
..
components build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
directives fix(router): ensure check for match options is compatible with property renaming (#43086) 2021-08-09 10:26:07 -07:00
operators fix(router): Remove information about attached component when deactivating route (#41381) 2021-04-07 13:55:31 -07:00
utils ci: add lint error for files with missing trailing new-line (#42478) 2021-06-04 13:31:03 -07:00
apply_redirects.ts docs: add note about redirects after absolute redirect (#42277) 2021-05-25 22:13:07 +00:00
config.ts docs: add note about redirects after absolute redirect (#42277) 2021-05-25 22:13:07 +00:00
create_router_state.ts fix(router): Only retrieve stored route when reuse strategy indicates it should reattach (#30263) 2021-04-15 11:32:59 -07:00
create_url_tree.ts fix(router): fragment can be null (#37336) 2021-03-22 10:02:39 -07:00
events.ts docs: Add import line to router event example for clarification (#42935) 2021-07-23 12:06:34 -07:00
index.ts feat(router): Add more find-tuned control in routerLinkActiveOptions (#40303) 2021-02-24 15:32:05 -08:00
interfaces.ts docs: update reference doc for router guards and resolvers (#38079) 2020-07-15 12:32:10 -07:00
private_export.ts fix(router): properly assign ExtraOptions to Router in RouterTestingModule (#39096) 2020-10-05 16:35:14 -07:00
recognize.ts fix(router): recursively merge empty path matches (#41584) 2021-04-14 15:47:07 -07:00
route_reuse_strategy.ts fix(router): export DefaultRouteReuseStrategy to Router public_api (#31575) 2020-08-13 16:02:41 -07:00
router.ts fix(router): eagerly update internal state on browser-triggered navigations (#43102) 2021-08-16 09:33:23 -07:00
router_config_loader.ts docs: expand documentation for ROUTES (#42398) 2021-05-27 16:47:39 -07:00
router_module.ts fix(router): error if module is destroyed before location is initialized (#42560) 2021-06-17 18:11:53 +00:00
router_outlet_context.ts feat(router): Allow for custom router outlet implementations (#40827) 2021-02-19 09:13:17 -08:00
router_preloader.ts fix(router): fix load interaction of navigation and preload strategies (#40389) 2021-02-16 11:28:50 -08:00
router_scroller.ts refactor(router): Add annotations to correct Router documentation (#38448) 2020-08-13 11:36:10 -07:00
router_state.ts refactor(router): ensure compatibility with noImplicitOverride (#42512) 2021-07-12 13:11:15 -07:00
shared.ts fix(router): fix error when calling ParamMap.get function (#31599) 2020-06-25 11:57:24 -07:00
url_handling_strategy.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
url_tree.ts fix(router): Allow question marks in query param values (#31187) 2021-08-06 10:49:37 -07:00
version.ts docs: fix package name in version.ts files in different packages (#41208) 2021-05-10 10:26:34 -04:00