Below is my app.routing.ts
export const Approute: Routes = [
{
path: 'login',
component: LoginComponent
},
{
path: 'home',
component: HomeComponent,
children: [
{
path: 'dashboard',
component: DashboardComponent
},
{
path: 'trip-details',
component: TripDetailsComponent
}
]
},
{ path: 'not-found', component : NotFoundComponent },
{ path: '**', redirectTo: '/not-found' }
];
component.ts
viewDetails(details) {
...
this.route.navigate(['../trip-details']);
}
Above i have a component and am trying to navigate to another sibling component but am not able to navigate to http://localhost:4200/home/trip-details
its redirecting me to http://localhost:4200/not-found
.
Where am doing wrong?