Sunday, 15 November 2020

Angular interface not loading when pressing back

When pressing the back button on an android emulator redirects to the previous component, but the interface of that component does not load.

Here is what I already know:

  • any static html in the component's template is visible
  • any dynamic content generated with i.e. does not show up
  • executing this.location.back(); yields the same result as pressing the back button
  • ngOnInit() is invoked on the component the browser goes back to
  • create a custom RouteReuseStrategy does not help

I suspect it has something to do with NgZone, but putting this.zone.run(() => {}) around an invocation of this.location.back(); does not fix the problem, neither would it help with the OS's native back button.



from Angular interface not loading when pressing back

No comments:

Post a Comment