angular-cn/packages/router/src
Mathieu Lemoine 3817e5f1df fix(router): Fix arguments order for call to shouldReuseRoute (#26949)
The `createOrReuseChildren` function calls shouldReuseRoute with the
previous child values use as the future and the future child value used
as the current argument. This is incosistent with the argument order in
`createNode`. This inconsistent order can make it difficult/impossible
to correctly implement the `shouldReuseRoute` function. Usually this
order doesn't matter because simple equality checks are made on the
args and it doesn't matter which is which.

More detail can be found in the bug report: #16192.

Fix #16192

BREAKING CHANGE: This change corrects the argument order when calling
RouteReuseStrategy#shouldReuseRoute. Previously, when evaluating child
routes, they would be called with the future and current arguments would
be swapped. If your RouteReuseStrategy relies specifically on only the future
or current snapshot state, you may need to update the shouldReuseRoute
implementation's use of "future" and "current" ActivateRouteSnapshots.

PR Close #26949
2020-09-15 11:33:52 -07:00
..
components build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
directives perf(router): use `ngDevMode` to tree-shake error messages in router (#38674) 2020-09-10 09:06:35 -07:00
operators perf(router): use `ngDevMode` to tree-shake error messages in router (#38674) 2020-09-10 09:06:35 -07:00
utils perf(router): use `ngDevMode` to tree-shake error messages in router (#38674) 2020-09-10 09:06:35 -07:00
apply_redirects.ts refactor(router): Remove `defer` as it's not needed anymore (#38781) 2020-09-10 08:55:31 -07:00
config.ts refactor(router): extract Router config utils to a separate file (#38229) 2020-07-27 09:49:14 -07:00
create_router_state.ts fix(router): Fix arguments order for call to shouldReuseRoute (#26949) 2020-09-15 11:33:52 -07:00
create_url_tree.ts fix(router): add null support for RouterLink directive (#32616) 2020-06-25 11:58:00 -07:00
events.ts docs: update router api documentation (#37980) 2020-07-16 13:52:40 -07:00
index.ts fix(router): export DefaultRouteReuseStrategy to Router public_api (#31575) 2020-08-13 16:02:41 -07:00
interfaces.ts docs: update reference doc for router guards and resolvers (#38079) 2020-07-15 12:32:10 -07:00
private_export.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
recognize.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
route_reuse_strategy.ts fix(router): export DefaultRouteReuseStrategy to Router public_api (#31575) 2020-08-13 16:02:41 -07:00
router.ts perf(router): use `ngDevMode` to tree-shake error messages in router (#38674) 2020-09-10 09:06:35 -07:00
router_config_loader.ts refactor(router): extract Router config utils to a separate file (#38229) 2020-07-27 09:49:14 -07:00
router_module.ts perf(router): use `ngDevMode` to tree-shake error messages in router (#38674) 2020-09-10 09:06:35 -07:00
router_outlet_context.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
router_preloader.ts docs(router): fixed PreloadAllModules comment typo (#38758) 2020-09-09 09:07:49 -07:00
router_scroller.ts refactor(router): Add annotations to correct Router documentation (#38448) 2020-08-13 11:36:10 -07:00
router_state.ts docs: update router api documentation (#37980) 2020-07-16 13:52:40 -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): properly compare array queryParams for equality (#37709) (#37860) 2020-07-06 13:50:32 -07:00
version.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00