So verwenden Sie redirectTo
im Fall von untergeordneten Routing mit einem Parameter in angular2. meine Routing-Struktur wie dieseredirectTo in angular2 für untergeordnetes Routing
const appRoutes: Routes = [
{ path: '', redirectTo : '/home', pathMatch: 'full'},
{ path: 'home', component: HomeComponent},
{ path: 'xyz/:id', component: XYZ },
{
path: 'abc/:id', component: ABC,
children: [
{ path: '', redirectTo : 'def', pathMatch: 'prefix' },
{ path: 'def/:id', component: DEF }
]
}
]
Aber es funktioniert nicht
auch, was ist pathMatch
in Routing?
Entschuldigung, aber in meinem Fall ist id nicht dasselbe;) was jetzt zu tun? –