Hello there! I'm having trouble understanding how to navigate new routes with children in Angular 2 rc 4. I'm trying to route to the TestComponent, which has a child, but I keep getting an error message saying "cannot match any route 'test'". Here is how I am doing my routing: this.guide.navigate(['test']);
.
These are the routes I have declared:
const routes: RouterConfig = [
{
path: '',
component: LogInComponent
},
{
path: 'pin',
component: PinComponent,
},
{
path: 'test',
component: TestComponent,
children: [
{
path: '/:page',
component: FoodComponent
}
]
}
]
export const mainRouterProviders = [
provideRouter(routes)
];
I cannot set a default page in the test section (like "path: '/'") because its children function as tabs and their list is loaded in the constructor of the TestComponent.