I have a main component with routes:
@Routes([
{
path : "/auth/login",
component: AuthComponent
},
{
path : "/",
component: DefaultComponent
}
])
DefaultComponent routes:
@Routes([
{
path : "/",
component: LevelListComponent
},
{
path : "/levels/:id/add",
component: LevelListComponent
},
{
path : "/levels/:id/edit",
component: LevelListComponent
},
{
path : "/scripts",
component: ScriptListComponent
}
])
When I try to navigate to /scripts I see an error:
app.js:44947 EXCEPTION: Error: Uncaught (in promise): Cannot match any routes. Current segment: 'undefined'. Available routes: ['/auth/login', '/']
In beta I could do:
{
path: "/...",
component: SomeComponent
}
But now it's not working.
And how can I do create a dynamic route in template?
<a [routerLink]="menuItem.url">