You can set routes as follows.
const routes: Routes = [
{
path: 'parent-component', //<---- parent component declared here
component: ParentComponent,
children: [ //<---- child components declared here
{
path:'profile-menu-items',
component: ProfileMenuItemsComponent
},
{
path:'profile-menu-images',
component: ProfileMenuImagesComponent
},
{
path:'profile-menu-location',
component: ProfileMenuLocationComponent
}
]
}
];
add redirect to basic in your routes config:
export const appRoutes: Routes = [
{ path: 'profile', component: ProfileComponent,
children: [
{
path:'',
redirectTo: 'basic',
pathMatch: 'full'
},
{
path: 'basic',
component: BasicComponent,
pathMatch: 'full'
},
{
path: 'company',
component: CompnayComponent
},
{
path: 'contacts',
component: ContactsComponent
},
{
path: 'compliance',
component: ComplianceComponent
}
]
}