Below is the configuration of the child routes for my project:
export const ProjectRouter: RouterConfig = [
{ path: 'projects', component: MainProjectComponent,
children: [
{ path: 'new', component: NewProjectComponent, canActivate: [AuthRouter] },
{ path: ':id', component: ProjectComponent, canActivate: [AuthRouter] },
{ path: '', component: ProjectsComponent, canActivate: [AuthRouter] }
] }
];
MainProjectComponent:
@Component({
moduleId: module.id,
template: '<router-outlet></router-outlet>',
directives: [ROUTER_DIRECTIVES]
})
export class MainProjectComponent {}
Although the routes to "/project/new" or "/projects/:id" are functioning properly, I encountered an issue when trying to access "/projects" as it fails to display the ProjectsComponent (essentially a list).
There are no errors, just a blank router outlet. I am unsure of what I might be overlooking here...