angular-cn/aio/content
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
..
cli refactor(docs-infra): remove obsolete `format` attribute from code examples (#31674) 2019-07-24 14:38:54 -07:00
cli-src build(docs-infra): make the git ref for cli command docs configurable (#26391) 2018-10-11 12:57:49 -07:00
examples docs: refactor routing doc (#35566) 2020-04-16 10:36:01 -07:00
guide fix(router): cancel navigation when at least one resolver completes with no "next" emission (#24621) 2020-05-04 12:36:49 -07:00
images docs: add Annie Wang to contributors.json (#36612) 2020-04-23 12:08:09 -04:00
marketing docs: add Annie Wang to contributors.json (#36612) 2020-04-23 12:08:09 -04:00
start docs: improve startup nav, naming, and terminology (#35533) 2020-04-22 17:08:29 -04:00
tutorial docs: improve startup nav, naming, and terminology (#35533) 2020-04-22 17:08:29 -04:00
file-not-found.md fix(docs-infra): do not create an anchor for the `file-not-found` header (#27250) 2018-12-05 13:26:26 -08:00
license.md build: bump year (#34651) 2020-01-13 07:21:43 -08:00
navigation.json docs: improve startup nav, naming, and terminology (#35533) 2020-04-22 17:08:29 -04:00