angular-docs-cn/packages/router/test
Paul Gammans 95ad452e54 fix(router): fix load interaction of navigation and preload strategies (#40389)
Fix router to ensure that a route module is only loaded once especially
in relation to the use of preload strategies with delayed or partial
loading.

Add test to check the interaction of PreloadingStrategy and normal
router navigation under differing scenarios.
Checking:
 * Prevention of duplicate loading of modules.
   related to #26557
 * Prevention of duplicate RouteConfigLoad(Start|End) events
   related to #22842
 * Ensuring preload strategy remains active for submodules if needed
   The selected preload strategy should still decide when to load submodules
 * Possibility of memory leak with unfinished preload subscription
   related to #26557
 * Ensure that the stored loader promise is cleared so that subsequent
   load will try the fetch again.
 * Add error handle error from loadChildren
 * Ensure we handle error from with NgModule create

Fixes #26557 #22842 #26557

PR Close #40389
2021-02-16 11:28:50 -08:00
..
aot_ngsummary_test build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
operators fix(router): update type castings for JSON.parse usage (#40710) 2021-02-09 10:48:43 -08: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): fix load interaction of navigation and preload strategies (#40389) 2021-02-16 11:28:50 -08:00
bootstrap.spec.ts fix(common): Prefer to use pageXOffset / pageYOffset instance of scrollX / scrollY (#28262) 2020-11-19 12:22:03 -08:00
config.spec.ts refactor(router): Produce error message when canActivate is used with redirectTo (#40067) 2021-01-05 10:09:27 -08: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): always stringify matrix parameters (#25095) 2021-01-20 16:19:45 -08:00
helpers.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
integration.spec.ts fix(router): stop emitting to event observable on destroy (#40638) 2021-02-04 10:46:46 -08:00
recognize.spec.ts fix(router): Ensure named outlets with empty path parents are recognized (#40029) 2021-01-05 12:43:47 -08: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): fix load interaction of navigation and preload strategies (#40389) 2021-02-16 11:28:50 -08: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 docs: update links to use HTTPS as protocol (#39718) 2020-11-20 12:52:16 -08:00
url_tree.spec.ts fix(router): properly compare array queryParams for equality (#37709) (#37860) 2020-07-06 13:50:32 -07:00