I have the following route config and in this example, I can get the id parameter in the StudentComponent by using the route functions.
However, I need to pass this id parameter to the child route of this component, but I am not sure if I have to update the following config to pass this id parameter to the EducationComponent.
Should I use the same approach in StudentComponent also in the EducationComponent as well?
{
path: 'student/:id',
component: StudentComponent,
children: [
{
path: '',
redirectTo: 'education',
},
{
path: 'education',
component: EducationComponent
}
]
}