Currently, I have a controller that acts as a wrapper for ui-router and manages its flow, similar to a menu bar. When a user clicks on a menu item, a function is triggered that changes the ui-router state and broadcasts an event to the inner controllers. Each inner controller within this ui-router can listen for and respond to this event. However, the inner controllers perform validation on this event, and if the validation fails, I am unable to revert the state change. How can I address this issue? Thank you.
update: I have attempted using the ui-router $stateChangeStart event as a solution, but it remains incomplete. Now, a new issue has arisen. The main controller, which houses the ui-router and menu bar, includes a progress bar. This main controller is registered to $stateChangeStart to manage the progress bar, but the child view, also registered to the event, is preventing the default action. As a result, the controllers are now in an inconsistent state. The main controller has already handled the progress bar, but the view itself has not changed. Any advice on how to proceed?