diff --git a/packages/angular/ssr/src/routes/ng-routes.ts b/packages/angular/ssr/src/routes/ng-routes.ts index 1f4f7c7d5613..44c4ca5660e1 100644 --- a/packages/angular/ssr/src/routes/ng-routes.ts +++ b/packages/angular/ssr/src/routes/ng-routes.ts @@ -407,7 +407,9 @@ export async function getRoutesFromAngularRouterConfig( const platformRef = platformServer([ { provide: INITIAL_CONFIG, - useValue: { document, url: `${protocol}//${host}/` }, + // The route below is intentionally set to a non-existent path + // to avoid rendering the root route during route extraction. + useValue: { document, url: `${protocol}//${host}/ng-extract-routes` }, }, { provide: ɵConsole,