angular/packages/router/test
Andrew Scott 3278966068 fix(router): Ensure newly resolved data is inherited by child routes (#52167)
The current way of computing a route's params and data recomputes
inherited data from the inheritance root every time. When the
inheritance strategy is "emptyOnly", this isn't necessarily the root of
the tree, but some point along the way (it stops once it reaches an
ancestor route with a component).

Instead, this commit updates parameter inheritance to only inherit data
directly from the parent route (again, instead of recomputing all
inherited data back to the inheritance root). The only requirement for
making this work is that the parent route data has already calculated
and updated its own inherited data. This was really already a
requirement -- parents need to be processed before children.

In addition, the update to the inheritance algorithm in this commit
requires more of an understanding that a resolver running higher up in
the tree has to propagate inherited data downwards. The previous
algorithm hid this knowledge because resolvers would recompute inherited
data from the root when run. However, routes that did not have resolvers
rerun or never had resolvers at all would not get the updated resolved data.

fixes #51934

PR Close #52167
2023-10-19 10:26:27 -07:00
..
directives refactor(router): Ensure data is bound to components in change detection following navigation (#49741) 2023-04-12 09:33:11 -07:00
operators fix(router): Ensure newly resolved data is inherited by child routes (#52167) 2023-10-19 10:26:27 -07:00
utils build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
apply_redirects.spec.ts fix(router): Allow redirects after an absolute redirect (#51731) 2023-09-26 10:59:20 -07:00
bootstrap.spec.ts feat(router): Add option to skip the first view transition (#51825) 2023-09-22 09:48:09 -07:00
BUILD.bazel fix(router): Ensure title observable gets latest values (#51561) 2023-08-31 16:42:44 +00:00
computed_state_restoration.spec.ts fix(router): Remove deprecated Router properties (#51502) 2023-08-29 19:47:58 +00:00
config.spec.ts refactor(router): code cleaning (#48259) 2022-12-09 09:59:20 -08:00
create_router_state.spec.ts fix(router): Route matching should only happen once when navigating (#49163) 2023-03-29 14:40:41 -07:00
create_url_tree.spec.ts fix(router): Apply named outlets to children empty paths not appearing in the URL (#51292) 2023-08-10 09:18:30 -07:00
default_export_component.ts feat(router): auto-unwrap default exports when lazy loading (#47586) 2022-10-04 14:40:58 -07:00
default_export_routes.ts feat(router): auto-unwrap default exports when lazy loading (#47586) 2022-10-04 14:40:58 -07:00
helpers.ts refactor(router): Remove legacy url creation code (#49360) 2023-03-22 16:37:01 +01:00
integration.spec.ts refactor(router): Remove internal state tracking for browserUrlTree (#48065) 2023-09-19 16:50:56 +02:00
page_title_strategy_spec.ts build: align with internal tsconfig options (#51728) 2023-09-12 11:39:42 -07:00
recognize.spec.ts fix(router): children of routes with loadComponent should not inherit parent data by default (#52114) 2023-10-10 09:36:37 -07:00
regression_integration.spec.ts refactor(router): Remove RouterTestingModule in favor of RouterModule.forRoot (#49427) 2023-04-04 15:12:33 -07:00
router.spec.ts refactor(router): move location methods into state_manager.ts (#52032) 2023-10-05 11:02:07 -07:00
router_link_spec.ts refactor(router): use transform to coerce input values (#50589) 2023-06-06 14:15:50 -07:00
router_preloader.spec.ts fix(router): Ensure Router preloading works with lazy component and static children (#49571) 2023-03-24 10:41:10 -07:00
router_scroller.spec.ts Revert "refactor(router): Remove zone code from router scroller (#49238)" (#49311) 2023-03-03 18:31:04 +00:00
router_state.spec.ts refactor(router): code cleaning (#48259) 2022-12-09 09:59:20 -08:00
shared.spec.ts fix(router): fix error when calling ParamMap.get function (#31599) 2020-06-25 11:57:24 -07:00
standalone.spec.ts refactor(router): Remove RouterTestingModule in favor of RouterModule.forRoot (#49427) 2023-04-04 15:12:33 -07:00
url_serializer.spec.ts build: align with internal tsconfig options (#51728) 2023-09-12 11:39:42 -07:00
url_tree.spec.ts refactor(router): run spell check on router package (#50445) 2023-05-24 13:56:56 +00:00
view_transitions.spec.ts feat(router): Add callback to execute when a view transition is created (#52002) 2023-10-10 11:16:22 -07:00