Skip to content

Child Routes

Child routes allow nested navigation within a parent component. The parent component has its own where child components render.

const routes: Routes = [
{
path: 'admin',
component: AdminLayoutComponent,
children: [
{ path: 'dashboard', component: DashboardComponent },
{ path: 'users', component: UsersComponent },
{ path: '', redirectTo: 'dashboard', pathMatch: 'full' }
]
}
];

Child routes organize complex layouts and create natural URL hierarchies.”