355208 (2) [Avatar] Offline
#1
Hi,

In one of my ionic application, I have to support dynamic states in ui-router, where the content of such pages will be based on a service response. Template is going to be same for all such dynamic pages and resides in the app itself.

This is not just a single page where i can have the usual dedicated state for it. This dynamic page will again have navigation from it which is also a dynamic state/page. Length of such navigation will be different case to case.

In such case, How can i start / handle the dynamic states as well its navigation ?

NORMAL STATE --> [ DYNAMIC STATE --> DYNAMIC STATE --> DYNAMIC STATE..............--> DYNAMIC STATE ]

jeremy.wilken (208) [Avatar] Offline
#2
You can register additional states but its not a default feature. This SO topic has some concepts for how to accomplish it and another module that might help.

http://stackoverflow.com/questions/25866387/angular-ui-router-programmatically-add-states
http://christopherthielen.github.io/ui-router-extras/#/future

If you aren't able to register all of the routes, you might have to rely on full page navigation instead of html5 navigation so the server can handle the dynamic routing. I'm a little unsure about your architecture needs, but that seems like a good start.