angular-docs-cn/packages/router/test
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
..
aot_ngsummary_test build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
operators build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
utils build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
BUILD.bazel test(router): fix router test failing on IE (#36742) 2020-04-23 12:13:27 -04:00
apply_redirects.spec.ts fix(router): support lazy loading for empty path named outlets (#38379) 2020-09-08 10:15:21 -07:00
bootstrap.spec.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
config.spec.ts refactor(router): extract Router config utils to a separate file (#38229) 2020-07-27 09:49:14 -07:00
create_router_state.spec.ts fix(router): Fix arguments order for call to shouldReuseRoute (#26949) 2020-09-15 11:33:52 -07:00
create_url_tree.spec.ts fix(router): add null support for RouterLink directive (#32616) 2020-06-25 11:58:00 -07:00
helpers.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
integration.spec.ts refactor(router): Remove `defer` as it's not needed anymore (#38781) 2020-09-10 08:55:31 -07:00
recognize.spec.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
regression_integration.spec.ts fix(router): ensure routerLinkActive updates when associated routerLinks change (#38511) 2020-08-18 10:21:49 -07:00
router.spec.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
router_preloader.spec.ts fix(router): prevent calling unsubscribe on undefined subscription in RouterPreloader (#38344) 2020-08-05 10:54:41 -07:00
router_scroller.spec.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
router_state.spec.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
shared.spec.ts fix(router): fix error when calling ParamMap.get function (#31599) 2020-06-25 11:57:24 -07:00
spy_ng_module_factory_loader.spec.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
url_serializer.spec.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
url_tree.spec.ts fix(router): properly compare array queryParams for equality (#37709) (#37860) 2020-07-06 13:50:32 -07:00