what is the right way to reload page not router?
I saw E.g window.location.reload() but its not a good practice in SSR right?
what is the right way to reload page not router?
I saw E.g window.location.reload() but its not a good practice in SSR right?
There is no this is the way
. I've running a big application and we setup a websocket reload event to force every client to reload the application with window.location.reload(true)
, so that we can build and publish a new version of the application and forces everyone to use the new one so that nothing breaks.
For angular itself there is only the router option:
@ngModule({
imports: [RouterModule.forRoot(routes, {onSameUrlNavigation: ‘reload’})],
exports: [RouterModule],
})