Bird
0
0

Which of these best describes how Angular uses Zone.js internally?

easy🧠 Conceptual Q2 of 15
Angular - Change Detection
Which of these best describes how Angular uses Zone.js internally?
AIt manages CSS styles dynamically
BIt replaces JavaScript event loop with a custom one
CIt patches async APIs to know when tasks start and finish
DIt compiles templates into optimized JavaScript
Step-by-Step Solution
Solution:
  1. Step 1: Identify Zone.js mechanism

    Zone.js patches async APIs like setTimeout and promises to track tasks.
  2. Step 2: Understand Angular's use

    Angular relies on this patching to detect when to run change detection.
  3. Final Answer:

    It patches async APIs to know when tasks start and finish -> Option C
  4. Quick Check:

    Angular uses Zone.js patching = It patches async APIs to know when tasks start and finish [OK]
Quick Trick: Zone.js patches async APIs to track tasks [OK]
Common Mistakes:
MISTAKES
  • Thinking Zone.js replaces the event loop
  • Confusing Zone.js with template compilation
  • Assuming Zone.js manages CSS

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Angular Quizzes