Currently, I am in the process of developing an angularjs application that utilizes a bootstrap modal feature.
My goal is to have the modal close when the user presses the back button on their phone.
I have disabled html5mode, so my URLs include the # symbol.
To achieve this functionality, my approach involves using history.pushstate(null,null,'modalopened') when the modal opens, and removing it when the modal closes or the user navigates backward by clicking the back button.
Although mobile phone back buttons typically navigate through the history api, I encounter a redirect issue where I get sent back to the root '/#/' upon implementation.