I figured out what was going on. In case anyone else hits a similar issue, the problem in this case was in WorkspaceRoutes.
export const WorkspaceRoutes: RouterConfig = [
{path: 'workspace/:id', component: WorkspaceRootComponent},
{children: [ // this should not be the start of a new object
{path: 'projects', component: WorkspaceDashboardComponent},
{path: 'newproject', component: ProjectNewComponent},
{path: '', redirectTo: 'projects', terminal: true},
]}
];
Should be
export const WorkspaceRoutes: RouterConfig = [
{path: 'workspace/:id',
component: WorkspaceRootComponent,
children: [
{path: 'projects', component: WorkspaceDashboardComponent},
{path: 'newproject', component: ProjectNewComponent},
{path: '', redirectTo: 'projects', terminal: true},
]}
];
The children item of WorkspaceRootComponent was not under that item, but on the same level.
Không có nhận xét nào:
Đăng nhận xét