1

I'm using Angular location.goBack navigation. I would like to disable a back navigation button if the next goBack execution will navigate outside of the app.

Is there a best practice way to achieve this?

Rafi Henig
  • 5,950
  • 2
  • 16
  • 36

1 Answers1

2

This thing is really tricky. Browser history didn't provide a way to handle URLs. You can just do back. So, you detect navigation outside your app you have to implement your own history log.

But better avoid copping in app default browser functionality, because you will catch a lot of tricky bugs.