I am using angular ui-router. In some cases in my application I open popups without changing the url. I want to be able to close this popup when clicking the browser back button - on mobile.
Is there a way to do it with (or without) ui-router?
EDIT:
A more specific explanation: I have a menu which is a popup and it can be opened all the time. I want this menu to be closed with browser back button on mobile. If I change the url when opening the menu everything should work. BUT is there a way to define a state that adds a suffix to current url?
For example if I have two urls:
- myapp/page1
- myapp/page2
Then opening the menu will switch to "menu" state which will change the url to either:
- myapp/page1/menu
- myapp/page2/menu
If this is not possible then I would like to open the menu without changing the url and still be able to close the menu with the browser back button.