• Overview
@angular/ssr

ServerRoutePrerenderWithParams

interface

A server route configuration that uses Static Site Generation (SSG) mode, including support for routes with parameters.

  
    interface ServerRoutePrerenderWithParams extends Omit<ServerRoutePrerender, 'fallback'> {}
  
  

fallback

PrerenderFallback | undefined

Optional strategy to use if the SSG path is not pre-rendered. This is especially relevant for routes with parameterized URLs, where some paths may not be pre-rendered at build time.

This property determines how to handle requests for paths that are not pre-rendered:

getPrerenderParams

() => Promise<Record<string, string>[]>

A function that returns a Promise resolving to an array of objects, each representing a route path with URL parameters. This function runs in the injector context, allowing access to Angular services and dependencies.

path

string

The path associated with this route.

headers

Record<string, string> | undefined

Optional additional headers to include in the response for this route.

Specifies that the route uses Static Site Generation (SSG) mode.

Jump to details