I am trying to find a way to show a specific component when url has only a specific value. Basically this is how is looking the routing now:
const routes: Routes = [
{
path: 'users',
component: MainComponent,
children: [
{
path: ':id',
component: DashboardComponent,
children: [
{
path: '1',
component: NeedToRenderThisComponent
},
{
path: '',
component: DashboardComponent
},
{
path: '',
outlet: 'sidebar',
component: SidebarComponent
}
]
}
]
}
];
So what I am looking for is when user hits or enters another way on '/users/1', user will see NeedToRenderThisComponent. For all others values there will be DashboardComponent.
DashboardComponent contains two router outlets
<router-outlet name="sidebar"></router-outlet>
<router-outlet></router-outlet>