My route configuration looks like this:
const routes: Routes = [
{ path: '', component: UserComponent, children: [
{ path: '', component: LoginComponent },
{ path: 'signup', component: SignupComponent }
]},
{ path: 'dashboard', component: MainComponent, children: [
{ path: '', component: DashboardComponent, children: [
{ path: '', redirectTo: '0', pathMatch: 'full' },
{ path: '0', component: NoListComponent },
{ path: ':id', component: ListComponent },
]},
{ path: 'createlist', component: CreateListComponent },
{ path: 'create', component: CreateTaskComponent }
]},
];
When using routerLink="dashboard/create"
or
routerLink="dashboard/createlist"
, the issue arises where only the ListComponent displays with no content, instead of CreateListComponent or CreateTaskComponent.