How can i navigate from child:
localhost/#/pages/config/out-devices/1000
to parent
localhost/#/pages/config/out-devices
i tried:
back(){
this.router.navigate("../", {relativeTo: this.route});
}
in the child Component but get a redirection to default site
my routing.ts
const routes: Routes = [
{ path: 'login', component: LoginComponent},
{ path: '', redirectTo: 'login', pathMatch: 'full' },
{
path: 'pages',
canActivate: [AuthGuard],
component: PagesComponent,
children: [
{ path: '', redirectTo: 'devices'},
{ path: 'devices', component: DevicesComponent },
{ path: 'groups', component: GroupsComponent },
{
path: 'config',
component: ConfigComponent,
children: [
// general
{ path: 'out-devices', component: ConfigOutDevicesComponent },
{ path: 'out-devices/:id', component: ConfigOutDeviceDetailsComponent },
]
}
]
}
];