New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot match any routes for child paths #45659
Comments
To follow up, even removing the lazy loading doesn't seem to help. I went from [
...
{
path: 'static',
component: StaticPageLayoutComponent,
loadChildren: () => import('./pages/pages.module').then(m => m.PagesModule),
},
...
] to [
...
{
path: 'static',
component: StaticPageLayoutComponent,
children: [
...
{
path: '',
component: HomeComponent,
outlet: 'static-outlet',
},
{
path: 'contact-us',
component: ContactUsComponent,
outlet: 'static-outlet',
},
...
]
},
...
] with the same outcome, so it seems that lazy loading isn't the culprit here. |
It looks to me that you're missing |
Because you're using a named outlet, you need to be navigating to |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Which @angular/* package(s) are the source of the bug?
router
Is this a regression?
No
Description
My setup is the following
app.component.html
static-page-layout.component.html
top level routes:
routes in pages module:
The path /static seems to work fine.
However, whenever I click on any of the links (/static/contact-us, or similar), I get the "Cannot match any routes" exception.
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: