fix(portal-shell): catch-all route prevents NG04002 on /fr in dev mode #96
@@ -31,4 +31,16 @@ export const appRoutes: Route[] = [
|
||||
redirectTo: 'accessibility',
|
||||
pathMatch: 'full',
|
||||
},
|
||||
// Catch-all. In production each locale ships with its own
|
||||
// `<base href="/{locale}/">`, 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: '',
|
||||
},
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user