I have a bootstrap-modal in my application, and would like to be reflected on the browsing history when it's open, so when the user clicks the browser's back button - the modal will close.
I'm familiar with Angular's Location
object, so Location.back()
and Location.go()
works fine for my scenario.
The thing is - once the user clicked the back button, I would like to pop the top path from the browser history, so after closing the modal - the user couldn't reopen it using the browser's "next" button.
Any way to achieve this with Angular's Router / Location / any other Angular-ish way?