Within the app-routing.module of my application, I have implemented a lazy-loaded module:
const appRoutes: Routes = [
{ path: 'profile/:id',
loadChildren: './profile/profile-standalone/profile-standalone.module#ProfileStandaloneModule',
}
];
Below is the content of my profile-standalone-routing.module-
const routes: Routes = [
{
path: '',
component: ProfileStandaloneComponent,
children: [
{
path: '',
redirectTo: 'outputa',
pathMatch: 'full'
},
{
path: 'outputa',
component: ProfileOutputComponent
}
]
}
];
@NgModule({
imports: [RouterModule.forChild(routes)],
exports: [RouterModule]
})
export class ProfileStandaloneRoutingModule { }
Despite setting up the routing correctly, when I navigate to the URL "localhost:4200/profile/123/outputa", the "ProfileOutputComponent" does not load as expected.
Can anyone provide guidance on how to resolve this issue?