I have such a problem when I am on the User list page and I refresh it takes me to the main page. The page is written in angular on the frontend and .net on the backend. my app.routing module looks like this:
const routes: Routes = [
{
path: '',
loadChildren: './modules/dashboard/dashboard.module#DashboardModule',
canActivate: [AuthGuard]
},
{
path: 'users',
loadChildren: './modules/user/user.module#UserModule',
canActivate: [AuthGuard]
},
{
path: 'settings',
loadChildren: './modules/settings/settings.module#SettingsModule',
canActivate: [AuthGuard]
},
...
];
@NgModule({
imports: [RouterModule.forRoot(routes, { preloadingStrategy: PreloadAllModules, useHash: true })],
exports: [RouterModule]
})
export class AppRoutingModule { }