You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Page Not Found is the content of component PageNotFoundComponent
there the wildcard route ** if work very good the routes.
but, if i change the folder the language for one that not exist, for example fr
Cannot GET /fr/pr-home
in this case don't work the wildcard ** in the config the routes.
The result of ng build --localize
Please provide a link to a minimal reproduction of the bug
No response
Please provide the exception or error you saw
When don't find the folder, after of build app with ng build --localize. see example attachment
Cannot GET /fr/pr-home
How redirect the folder for default?
Please provide the environment you discovered this bug in (run ng version)
The text was updated successfully, but these errors were encountered:
ph360
changed the title
Cannot GET -- when don't find the folder language -- example Cannot GET /es2/pr-home
Cannot GET -- when don't find the folder language -- example Cannot GET /fr/pr-home
Apr 18, 2025
This behavior is expected because no Angular application is not mounted at /fr/. The ** route applies after the localized base href. For example, /es/**. This is similar to a missing resource scenario, where a custom middleware in the chain can handle the response.
Which @angular/* package(s) are the source of the bug?
router
Is this a regression?
Yes
Description
In app.routes.ts
import { Routes } from '@angular/router';
import { PrHomeComponent } from './pr-home/pr-home.component';
import { PrContactsComponent } from './pr-contacts/pr-contacts.component';
import { PageNotFoundComponent } from './page-not-found/page-not-found.component';
export const routes: Routes = [
{ path: '', component: PrHomeComponent},
{ path: 'pr-home', component: PrHomeComponent },
{ path: 'pr-contacts', component: PrContactsComponent },
{ path: '**', component: PageNotFoundComponent },
];
In app.routes.server.ts
import { RenderMode, ServerRoute } from '@angular/ssr';
export const serverRoutes: ServerRoute[] = [
{
path: 'pr-contacts',
renderMode: RenderMode.Prerender,
},
{
path: 'pr-home',
renderMode: RenderMode.Prerender,
},
{
path: '**',
renderMode: RenderMode.Client
}
];
https://pr360v2--pr360-v2.us-central1.hosted.app/es/pr-homefffff the result i show me the follow message
Page Not Found is the content of component PageNotFoundComponent
there the wildcard route ** if work very good the routes.
Cannot GET /fr/pr-home
in this case don't work the wildcard ** in the config the routes.
The result of ng build --localize
Please provide a link to a minimal reproduction of the bug
No response
Please provide the exception or error you saw
Please provide the environment you discovered this bug in (run
ng version
)Anything else?
No response
The text was updated successfully, but these errors were encountered: