I am interested in using ui-router to create a dynamic navigation system that can assemble pages in a unique and changing sequence. Instead of hardcoding the ui-sref attribute for each "next" button on the templates, I want the routing to be determined by the user's specific journey.
My goal is to:
- Have the user click a next button
- The routing controller will then determine which state the user should go to next, based on their individual path, and extract the necessary parameters
- The routing controller will then trigger $state.go('nextstate', params)
How can I create a generic button on the page, like so:
<a ui-sref="next">
Implementing the FutureStates add-on seems unnecessary for this situation, as all states are already defined; the challenge lies in deciding the order at runtime.
I also need to pass complex parameters to the state that cannot be included in the URL.