Bird
0
0

Given this Angular Universal pre-render config snippet:

medium📝 Predict Output Q4 of 15
Angular - Server-Side Rendering
Given this Angular Universal pre-render config snippet:
{ "routes": ["/", "/about"] }

What will be the result after running the pre-render command?
AOnly the root '/' route is pre-rendered
BStatic HTML files for '/' and '/about' routes are generated
CNo files are generated because routes array is invalid
DAll application routes are pre-rendered automatically
Step-by-Step Solution
Solution:
  1. Step 1: Understand routes array in prerender config

    The routes array explicitly lists '/' and '/about' to pre-render.
  2. Step 2: Determine output based on routes

    Only these two routes generate static HTML files, not all routes.
  3. Final Answer:

    Static HTML files for '/' and '/about' routes are generated -> Option B
  4. Quick Check:

    Routes listed = files generated [OK]
Quick Trick: Only listed routes get pre-rendered [OK]
Common Mistakes:
  • Assuming all routes pre-render automatically
  • Thinking empty or invalid routes array works
  • Believing only root route is pre-rendered by default

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Angular Quizzes