-
Notifications
You must be signed in to change notification settings - Fork 27.1k
Closed
Labels
P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentAn issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: commonIssues related to APIs in the @angular/common packageIssues related to APIs in the @angular/common packagearea: router
Milestone
Description
Which @angular/* package(s) are the source of the bug?
router
Is this a regression?
No
Description
If route starts with the same part as APP_BASE_HREF, the route becomes broken. E.g.:
app.module
{
provide: APP_BASE_HREF,
useValue: '/ru'
}
app-routing
{
path: 'rules',
loadChildren: () => import('./pages/text-pages/rules/rules.module').then(m => m.RulesModule)
},
And if you try to navigate example.com/rules you will get example.com/ru/les
Please, take a look at the stackblitz reproduction below.
Please provide a link to a minimal reproduction of the bug
https://stackblitz.com/edit/angular-ivy-68vpxc?file=src%2Fapp%2Fapp-routing.module.ts
Please provide the exception or error you saw
ERROR
Error: Uncaught (in promise): Error: Cannot match any routes. URL Segment: 'les'
Error: Cannot match any routes. URL Segment: 'les'
Please provide the environment you discovered this bug in (run ng version)
No response
Anything else?
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentAn issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: commonIssues related to APIs in the @angular/common packageIssues related to APIs in the @angular/common packagearea: router