Bird
0
0

Why is an Observable considered more powerful than a Promise in Angular?

hard🧠 Conceptual Q10 of 15
Angular - RxJS and Observables Fundamentals
Why is an Observable considered more powerful than a Promise in Angular?
ABecause it automatically caches all emitted values.
BBecause it supports multiple values, cancellation, and operators for transformation.
CBecause it can only emit one value but is easier to use.
DBecause it always runs synchronously and faster than Promise.
Step-by-Step Solution
Solution:
  1. Step 1: List Observable features

    Observables can emit multiple values, be canceled via unsubscribe, and use operators to transform data.
  2. Step 2: Compare with Promise limitations

    Promises emit once, cannot be canceled, and lack built-in operators.
  3. Final Answer:

    Because it supports multiple values, cancellation, and operators for transformation. -> Option B
  4. Quick Check:

    Observable power = multi-value + cancel + operators [OK]
Quick Trick: Observable = multi-value + cancel + operators [OK]
Common Mistakes:
MISTAKES
  • Thinking Observable is always synchronous
  • Believing Observable caches all values by default
  • Confusing single emission with Promise

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Angular Quizzes