Bird
0
0

You have this Angular template:

medium📝 Debug Q14 of 15
Angular - Routing
You have this Angular template:
<router-outlet></router-outlet>
<router-outlet></router-outlet>
What problem will this cause when navigating routes?
ABoth router outlets will display the same component simultaneously.
BAngular will throw an error because multiple unnamed router outlets are not allowed.
COnly the first router outlet will work; the second will be ignored silently.
DIt will work fine and show different components automatically.
Step-by-Step Solution
Solution:
  1. Step 1: Understand unnamed router outlet behavior

    Angular renders the primary route component in every unnamed <router-outlet> present in the template.
  2. Step 2: Identify the problem

    Having two unnamed outlets means both will display identical component content, leading to duplication.
  3. Final Answer:

    Both router outlets will display the same component simultaneously. -> Option A
  4. Quick Check:

    Multiple unnamed outlets duplicate primary route [OK]
Quick Trick: Multiple unnamed outlets show same component [OK]
Common Mistakes:
MISTAKES
  • Expecting an error from multiple unnamed outlets
  • Thinking only the first outlet renders
  • Believing outlets show different components automatically

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Angular Quizzes