I have a problem regarding the routing in Angular 5. I would like to create a child route but when i type the url (for child route) the parent component gets loaded. My routing:
path: 'user-admin/:id',
component: UserAdminComponent,
},
children: [
{
path: '',
component: UserAdminComponent,
pathMatch: 'full'
},
{
path: "final-exams",
component: FinalExamsComponent,
},
The two routes that belongs to the problem:
http://localhost:4200/user-admin/0
http://localhost:4200/user-admin/0/final-exams
Thank you for your help in advance! :)
<router-outlet>in your parent component ?