0

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?

Mrfet
  • 135
  • 1
  • 2
  • 6
  • You're going to have to be more explicit on your needs : `Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How To Ask page for help clarifying this question.` –  Jun 28 '19 at 08:16
  • ([ask] & [mcve]) –  Jun 28 '19 at 08:17
  • Possible duplicate of [How to reload page the whole page in Angular 2?](https://stackoverflow.com/questions/43985752/how-to-reload-page-the-whole-page-in-angular-2) – JohnnyDevNull Jun 28 '19 at 08:21

1 Answers1

0

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],
 })
JohnnyDevNull
  • 951
  • 1
  • 8
  • 20