angular-docs-cn/packages/router/test
Martin Sikora d9c4840a9c fix(router): cancel navigation when at least one resolver completes with no "next" emission (#24621)
This change aligns behavior for resolvers which return EMPTY. Currently EMPTY resolvers have inconsistent behavior:
- One resolver that returns EMPTY => won't navigate and just ends on ResolveStart router event.
- Two resolvers where both return EMPTY => throws "Error: Uncaught (in promise): EmptyError: no elements in sequence"
- Two resolvers where one returns a value and the other one returns EMPTY => Navigates successfully.
With this change any EMPTY resolver will cancel navigation.

BREAKING CHANGE: Any resolver which return EMPTY will cancel navigation.
If you want to allow the navigation to continue, you will need to update the resolvers to emit
some value, (i.e. defaultIfEmpty(...), of(...), etc).
PR Close #24195

PR Close #24621
2020-05-04 12:36:49 -07:00
..
aot_ngsummary_test build: derive ts_library dep from jasmine_node_test boostrap label if it ends in `_es5` (#34736) 2020-01-15 14:58:07 -05:00
operators fix(router): cancel navigation when at least one resolver completes with no "next" emission (#24621) 2020-05-04 12:36:49 -07:00
utils build: reformat repo to new clang@1.4.0 (#36613) 2020-04-14 12:08:36 -07:00
BUILD.bazel test(router): fix router test failing on IE (#36742) 2020-04-23 12:13:27 -04:00
apply_redirects.spec.ts build: reformat repo to new clang@1.4.0 (#36613) 2020-04-14 12:08:36 -07:00
bootstrap.spec.ts test(router): fix router test failing on IE (#36742) 2020-04-23 12:13:27 -04:00
config.spec.ts build: reformat repo to new clang@1.4.0 (#36613) 2020-04-14 12:08:36 -07:00
create_router_state.spec.ts build: reformat repo to new clang@1.4.0 (#36613) 2020-04-14 12:08:36 -07:00
create_url_tree.spec.ts build: reformat repo to new clang@1.4.0 (#36613) 2020-04-14 12:08:36 -07:00
helpers.ts build: reformat repo to new clang@1.4.0 (#36613) 2020-04-14 12:08:36 -07:00
integration.spec.ts fix(router): cancel navigation when at least one resolver completes with no "next" emission (#24621) 2020-05-04 12:36:49 -07:00
recognize.spec.ts build: reformat repo to new clang@1.4.0 (#36613) 2020-04-14 12:08:36 -07:00
regression_integration.spec.ts build: reformat repo to new clang@1.4.0 (#36613) 2020-04-14 12:08:36 -07:00
router.spec.ts build: reformat repo to new clang@1.4.0 (#36613) 2020-04-14 12:08:36 -07:00
router_preloader.spec.ts build: reformat repo to new clang@1.4.0 (#36613) 2020-04-14 12:08:36 -07:00
router_scroller.spec.ts build: reformat repo to new clang@1.4.0 (#36613) 2020-04-14 12:08:36 -07:00
router_state.spec.ts build: reformat repo to new clang@1.4.0 (#36613) 2020-04-14 12:08:36 -07:00
shared.spec.ts build: reformat repo to new clang@1.4.0 (#36613) 2020-04-14 12:08:36 -07:00
spy_ng_module_factory_loader.spec.ts test(ivy): run router tests with ivy on CI (#27195) 2018-11-21 09:19:40 -08:00
url_serializer.spec.ts build: reformat repo to new clang@1.4.0 (#36613) 2020-04-14 12:08:36 -07:00
url_tree.spec.ts build: reformat repo to new clang@1.4.0 (#36613) 2020-04-14 12:08:36 -07:00