I have an issue with angular routing. It is a legacy Angular 6 application. My routes are defined such as
Routes = [
{ path: '', component: DashboardComponent,pathMatch: 'full', canActivate: [AuthGuardService]},
{ path: 'seller', component: SellerComponent},
{ path: 'logout',component: LogoutComponent}
]
in app.module I'm using RouterModule.forRoot(appRoutes, {useHash: true})
in app.component.html I have <router-outlet>
and link which should take me to logout (loaded in router outlet). <a [routerLink]="['/logout']">Logout</a>
The behavior I'm observing is - the url in browser window is changed to ...hostname/logout however the component is not getting loaded in router outlet. In the code I do not see anything obvious that could restrict any redirects. Also, I'm not observing any errors in console. The url changes and nothing happens after that. Has anyone experienced similar issue? At this point I'm clueless what to look for - any filters, interceptors or anything else. Please, suggest what can be the cause of it.