I want to use ui-router to assemble navigation through a series of pages in a dynamically defined sequence. Each template is from an independent module and could be reordered or skipped, so I don't want to hardcode the ui-sref attribute for the "next" button on each template.
What I'm aiming for is
- User clicks next button
- Routing controller looks up which state this particular user should go to next (varies for each user), and pulls out the appropriate parameters
- Routing controller calls $state.go('nextstate', params)
How can I put a generic button on the page, like say
<a ui-sref="next">
The FutureStates add-on seems like overkill for this, all the states are already defined, I just don't know until runtime what order they should be called in.
I have complex parameters that I want to pass to the state that cannot be placed on the url.