Bird
0
0

You want to pre-render multiple routes in your Angular app. Which configuration in angular.json helps specify routes for pre-rendering?

hard📝 Application Q15 of 15
Angular - Server-Side Rendering
You want to pre-render multiple routes in your Angular app. Which configuration in angular.json helps specify routes for pre-rendering?
A"routes": ["/home", "/about", "/contact"] inside the prerender options
B"lazyModules": ["home", "about", "contact"] inside build options
C"serverTarget": "my-app:server" inside serve options
D"outputPath": "dist/my-app/static" inside build options
Step-by-Step Solution
Solution:
  1. Step 1: Identify prerender routes configuration

    Angular Universal uses a routes array inside prerender options to list paths to pre-render.
  2. Step 2: Differentiate other options

    lazyModules is unrelated to prerender routes, serverTarget defines server build, and outputPath sets build output folder.
  3. Final Answer:

    "routes": ["/home", "/about", "/contact"] inside the prerender options -> Option A
  4. Quick Check:

    Pre-render routes = routes array in prerender options [OK]
Quick Trick: List routes in prerender options to pre-render multiple pages [OK]
Common Mistakes:
  • Using lazyModules instead of routes for prerender
  • Confusing serverTarget with prerender routes
  • Changing outputPath instead of routes

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Angular Quizzes