I would like to achieve the following behaviour:
Routes:
I would like to have following routing definition:
const routes: Routes = [
{
path: 'patients',
component: PatientsComponent,
children: [
{
path: '',
component: PatientsListComponent,
children: [
{
path: ':id',
component: PatientDetailsComponent,
children: [
{
path: 'log',
component: PatientLogComponent,
}
]
}
]
}
]
},
];
If I do that DOM structure is nested ... Is it possible to open children horizontally (sibling like)? Further on I would also like to enable animations so that if depth is more than 3 first panels width will collapse ...
yes, this is possible, i make same app as your
and deeper and deeper
than u write router u use same components in depth
routing like your, but PatientList in my case not exist, i render in PatientComponent
RootComponent:
<app-menu></app-menu>
<router-outlet></router-outlet>
PatientComponent:
<app-list></app-list>
<router-outlet></router-outlet>
PatientDetailsComponent:
<app-data>DETAIL DATA HERE</app-data>
<router-outlet></router-outlet>
same deeper and deeper