Bird
0
0

Why does Angular require a in the parent component when using child routes?

hard🧠 Conceptual Q10 of 15
Angular - Routing
Why does Angular require a in the parent component when using child routes?
AIt automatically fetches child route data from the server.
BIt acts as a placeholder where child route components are rendered.
CIt prevents navigation to unauthorized child routes.
DIt styles the child components with default CSS.
Step-by-Step Solution
Solution:
  1. Step 1: Understand router-outlet role

    Router-outlet is a directive that marks where Angular inserts the matched child route component.
  2. Step 2: Eliminate incorrect options

    Options B, C, and D describe unrelated behaviors not handled by router-outlet.
  3. Final Answer:

    It acts as a placeholder where child route components are rendered. -> Option B
  4. Quick Check:

    Router-outlet = placeholder for child components [OK]
Quick Trick: Router-outlet is placeholder for child route components [OK]
Common Mistakes:
MISTAKES
  • Thinking router-outlet fetches data
  • Assuming router-outlet controls authorization
  • Believing router-outlet applies styles

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Angular Quizzes