Dynamic States & Views


#1

I’ve been working on a project that requires routing and tab views that are completely dynamic. The app does not know about the tabs and routing until after the info is loaded from the server.

To test out the concept, I put up a sample project. https://github.com/calendee/ionicDynamicRouting

If anyone has input on how to improve this, I’d really appreciate it.

NOTE : This is dependent on an unmerged pull request that allows ion-nav-view to evaluate an expression or dynamic name such as : <ion-nav-view name="currTab.viewName"></ion-nav-view>


Dynamic menu
#2

Nice, thanks for sharing this. Hope that PR gets accepted.


#3

This is cool. What do you think of making the view template come from the server instead of a static file? I think that will make it really flexible. Here is a working example below.

https://github.com/logicunit/ionicDynamicRouting2


#4

That would be good too. Unfortunately, the PR to enable interpolated Nav views will not be accepted. I overlooked the fact that doing so means ALL ion-nav-views would need to be interpolated. So, other developers doing just regular nav views would need to do something like {{my-nav-view-name}}.

So, this concept is dead in the water right now unless you’re willling to override the Ionic code yourself. This makes updates pretty painful.