I get error on navigation from 2 different nested routes
Whenever I try to navigate from 2 different nested routes I get this error
I am trying to logout from a portal routing from (patient/dashboard) to (auth/login) using the header component (shared module)
-
this is app-routing.module.ts app-routing.module
-
patient.html
<nz-layout>
<app-header></app-header>
<nz-content>
<router-outlet></router-outlet>
</nz-content>
<app-footer></app-footer>
</nz-layout>
- header.html
<button mat-menu-item (click)="onLogout()">
<mat-icon>logout</mat-icon>
<span>Logout</span>
</button>
- header.ts
onLogout() {
this.router.navigate(['/auth/login']);
}
Comments
Post a Comment