Add empty path routes as redirect automatically
const appRoutes: Routes = [
{
path:'',
redirectTo: 'a',
pathMatch: 'full'
},
{
path: 'a',
component: AComponent,
children:[
{
path:'',
redirectTo: 'x',
pathMatch: 'full'
},
{
path:'x',
component: AXcomponent
}
]
},
{
path: 'b',
component: bComponent
}
];