I am looking for a solution that will allow me to pause the execution of my code, display a dialog box, and then resume execution only after a specific button is pressed.
For example, if a user navigates from one page to another on my website, I want a dialog box to appear. If the user confirms the action by clicking a button in the dialog box, then the navigation should continue.
I am aware of the $routeChangeStart event, which provides information about the next route, but it seems to only handle preventing the route change. I am interested in finding a way to delay the route change and trigger it later.
My ideal approach would involve using event.preventDefault() within $routeChangeStart, storing the details of the next route, and then triggering the route change confirmation through user interaction.
Does anyone know how I could reapply a route change? One potential method could involve manipulating the originalPath using the params object and $location, but I am curious if there is a more direct way to achieve this.