In my app some URLs take the form
/department/:dep/employee/:emp/contacts
In my sidebar I show a list of all employees, each of which has a
In case your app-routing.module.ts looks similar to this:
{
path: '/department/:dep', component: DepartmentComponent, children: [
{ path: 'employee/:emp/contacts', component: EmployeeComponent },
// ... Other child routes
]
}
Assuming you are on the parent route http://localhost:4200/department/1, now the below routerLinks will work as mentioned:
./ represents relative path from current route/ represents absolute path from root route../ represents relative path to move up one level from current route