diff --git a/apps/portal-shell/src/app/app.routes.ts b/apps/portal-shell/src/app/app.routes.ts index ef48a31..5e89e14 100644 --- a/apps/portal-shell/src/app/app.routes.ts +++ b/apps/portal-shell/src/app/app.routes.ts @@ -31,4 +31,16 @@ export const appRoutes: Route[] = [ redirectTo: 'accessibility', pathMatch: 'full', }, + // Catch-all. In production each locale ships with its own + // ``, so the router never actually sees + // the locale segment — `/fr/foo` is normalised to `foo` before + // route matching, and unknown paths land here for a graceful + // bounce to home. In dev (`nx serve`) the dev server serves the + // source bundle for any URL, including `/fr/...`; without this + // fallback the router throws NG04002 trying to match `fr` as a + // segment. + { + path: '**', + redirectTo: '', + }, ];