mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
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 |
||
|---|---|---|
| .. | ||
| directives | ||
| operators | ||
| utils | ||
| apply_redirects.spec.ts | ||
| bootstrap.spec.ts | ||
| BUILD.bazel | ||
| computed_state_restoration.spec.ts | ||
| config.spec.ts | ||
| create_router_state.spec.ts | ||
| create_url_tree.spec.ts | ||
| default_export_component.ts | ||
| default_export_routes.ts | ||
| helpers.ts | ||
| integration.spec.ts | ||
| page_title_strategy_spec.ts | ||
| recognize.spec.ts | ||
| regression_integration.spec.ts | ||
| router.spec.ts | ||
| router_link_spec.ts | ||
| router_preloader.spec.ts | ||
| router_scroller.spec.ts | ||
| router_state.spec.ts | ||
| shared.spec.ts | ||
| standalone.spec.ts | ||
| url_serializer.spec.ts | ||
| url_tree.spec.ts | ||
| view_transitions.spec.ts | ||