angular/packages/router/test
Andrew Scott 17d10f7a99 fix(router): set default paramsInheritanceStrategy to 'always'
Set the default value of paramsInheritanceStrategy to 'always'. This change ensures that route parameters are inherited from parent routes by default, which is the behavior most users expect. It simplifies routing configuration for the majority of use cases.

This change aligns Angular with other popular routing systems where child routes automatically have access to parent parameters:
- React Router: useParams() includes parent params.
- Vue Router: $route.params includes parent params.
- Next.js: params are passed to nested layouts and pages.
- TanStack Router: useParams() includes parent params with full type safety.

BREAKING CHANGE: paramsInheritanceStrategy now defaults to 'always'

The default value of paramsInheritanceStrategy has been changed from 'emptyOnly' to 'always'. This means that route parameters are inherited from all parent routes by default. To restore the previous behavior, set paramsInheritanceStrategy to 'emptyOnly' in your router configuration.
2026-04-17 14:27:43 -07:00
..
directives feat(router): Add options optional parameter for withComponentInputBinding 2026-03-12 16:36:23 -06:00
integration fix(router): set default paramsInheritanceStrategy to 'always' 2026-04-17 14:27:43 -07:00
operators fix(router): set default paramsInheritanceStrategy to 'always' 2026-04-17 14:27:43 -07:00
utils refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
apply_redirects.spec.ts fix(router): set default paramsInheritanceStrategy to 'always' 2026-04-17 14:27:43 -07:00
bootstrap.spec.ts test(router): remove addEventListener call count check 2026-04-13 14:12:48 +03:00
BUILD.bazel refactor(router): Intercept navigate events (unless it's a rollback) 2025-11-06 15:00:08 -08:00
computed_state_restoration.spec.ts refactor(router): Permit deferring commit of traversal navigations 2026-03-03 14:09:11 -08:00
config.spec.ts build: update Jasmine to 6.0.0 2026-02-09 12:15:57 -08:00
create_router_state.spec.ts fix(router): set default paramsInheritanceStrategy to 'always' 2026-04-17 14:27:43 -07:00
create_url_tree.spec.ts test(router): move timeout and autoTick helpers to shared testing utilities 2026-02-10 07:45:00 -08:00
default_export_component.ts refactor(router): remove standalone true (#58950) 2024-12-05 16:02:37 -08:00
default_export_routes.ts refactor(router): switching to relative imports within the router package (#60557) 2025-04-01 14:54:05 +00:00
helpers.ts test(router): move timeout and autoTick helpers to shared testing utilities 2026-02-10 07:45:00 -08:00
page_title_strategy_spec.ts ci: reformat files 2025-12-16 14:44:19 -08:00
recognize.spec.ts fix(router): set default paramsInheritanceStrategy to 'always' 2026-04-17 14:27:43 -07:00
regression_integration.spec.ts test(router): move timeout and autoTick helpers to shared testing utilities 2026-02-10 07:45:00 -08:00
route_injector_cleanup.spec.ts feat(router): add controls for route cleanup 2026-01-05 14:43:56 -05:00
router.spec.ts refactor(router): Store route injector on ActivatedRoute instance 2025-11-20 17:05:10 -05:00
router_devtools.spec.ts feat(devtools): clean up router tree for stable release (#63081) 2025-09-02 20:59:15 -07:00
router_link_active.spec.ts feat(router): Update IsActiveMatchOptions APIs to accept a Partial 2026-01-29 12:10:40 -08:00
router_link_spec.ts test(router): remove provider zoneless from tests 2026-02-02 15:00:18 -08:00
router_navigation_extras.spec.ts refactor(router): switching to relative imports within the router package (#60557) 2025-04-01 14:54:05 +00:00
router_preloader.spec.ts test(router): move timeout and autoTick helpers to shared testing utilities 2026-02-10 07:45:00 -08:00
router_scroller.spec.ts test(router): move timeout and autoTick helpers to shared testing utilities 2026-02-10 07:45:00 -08:00
router_state.spec.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
shared.spec.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
standalone.spec.ts refactor(router): remove deprecated provideRoutes function. 2026-02-24 09:25:13 -08:00
trailing_slash_integration.spec.ts feat(common): Add Location strategies to manage trailing slash on write 2026-01-23 20:09:23 +00:00
tsconfig-test.json refactor(router): Intercept navigate events (unless it's a rollback) 2025-11-06 15:00:08 -08:00
url_serializer.spec.ts fix(router): normalize multiple leading slashes in URL parser 2026-04-14 12:34:03 +03:00
url_tree.spec.ts build: update Jasmine to 6.0.0 2026-02-09 12:15:57 -08:00
view_transitions.spec.ts test(router): remove provider zoneless from tests 2026-02-02 15:00:18 -08:00
with_platform_navigation.spec.ts build: update rules_browsers digest to ceb5275 2026-02-19 15:47:47 -08:00