Seems that when you have child states with dot notation, transitioning to them doesn’t work. The controllers do not get initialized either. The URL does change. Example:
If I create a separate state for “receive.purchaseOrder”, it works. Do I need to structure my child states differently? I’ve used this ui-router convention in other projects outside of Ionic and it seems to work.
I’ve tried all different ways of switching states and none seem to work.
It’ll be a lot easier for us to help if you post a code pen sample. Just looking at your code, I don’t see anything that jumps out as wrong.
I would wonder about the receive.purchaseOrder state. That URL is pretty ambiguous. I’m not sure if UI router can handle that or not as so many routes might look like that. Perhaps try changing it to :
Yeah, I’ll put a pen together. The URL shouldn’t matter, because child states will always append their URL to the parent (via UI-Router docs, and other apps that I’ve built. )
This still seems to be an issue for me. The states are definitely valid, otherwise ui-router would be throwing errors. The URL changes in the browser, but no transition happens.
Like I said, I’m using this convention outside of this Ionic project (separate one now) and it works. Not sure what’s up!
EDIT:
Seems that if you used named views and explicitly override the parent’s template using the @ notation.
Hey ui-router, please fill the placeholder (<ion-nav-view name="tab-dash"></ion-nav-view>) of my grand parent state (tab-dash@tab) with the content of my amazing template dash-detail.html.
So the trick is to target the correct views (tab-dash) in the correct state (tab).