When I refresh the page I return to the main page

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 { }

If it’s happening on an that you already deployed to a server it could be the fact that the server doesn’t fall back to the index.html but I guess you are not talking about a deployed app so this could happen for another reason.

The routing on your users module can cause this, are you also having the same thing happening in your settings module ?

Could you post what you have as routes in your users module ?