I have ionic modal which is opened withing code after button click.
I pass parameters to this modal.
I want that when I open this modal programmatically the route will be /my-modal.
But also when the back button of the browser is activated then this modal closes, so I want it to subscribe to an “onBackEvent”.
I searched but nothing worked. How do I do that?