Bird
0
0

What will happen if a Resolver returns an error Observable during route navigation?

medium📝 Predict Output Q5 of 15
Angular - Advanced Patterns
What will happen if a Resolver returns an error Observable during route navigation?
ANavigation is cancelled and error is propagated
BRoute activates with empty data
CResolver retries automatically
DRoute activates ignoring the error
Step-by-Step Solution
Solution:
  1. Step 1: Understand Resolver error behavior

    If a Resolver returns an error Observable, Angular cancels the navigation and propagates the error.
  2. Step 2: Check other options for correctness

    Route does not activate with empty data, no automatic retry, and errors are not ignored.
  3. Final Answer:

    Navigation is cancelled and error is propagated -> Option A
  4. Quick Check:

    Resolver error cancels navigation [OK]
Quick Trick: Resolver errors cancel navigation by default [OK]
Common Mistakes:
  • Assuming route activates despite Resolver error
  • Expecting automatic retry on error

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Angular Quizzes