Blocker bug with $state.go navigation!

I was reluctantly convinced to give Ionic a try. I had previously been using Angular/ui.router/Bootstrap. Big mistake.

Ionic doesn’t have the same kind of modals as Bootstrap does (and I understand the reasons why). So, I attempted to implement an authentication system with a login route, an abstract dashboard route, and a dashboard.feed route. For any route requiring authentication, I call a service from the OnEnter function of the controller which checks to see if a user is already authenticated. If not, it redirects them to the login route.

From the login controller, a successful authentication calls $state.go(“dashboard.feed”). But trying to do this gives me an error:

“Error: Could not resolve ‘/feed’ from state ‘login’”

$state.go works just fine if I attempt to call a route that doesn’t require dot-notation.

This is a major, major bug. I have no idea how this could possibly be missed in a supposedly production-level framework. Need a fix asap or I’ll have to ditch Ionic and go back to Angular.

C’mon, guys. You can do better than this.


Without seeing some code, we can’t really help. Routing issues are, unfortunately, often a misconfiguration with UI router (which we use underneath).

Can you paste your routes?

I put the relevant code in a pastebin here:

Let me know if you see anything obviously wrong with this.

@damoncasale, take a look at the nested state docs for UI Router:

From what I can tell, this has nothing to do with Ionic proper, but just a mis-configuration of your ui-router routes. Wish I could help more right now but without a running demo it’s hard to say.

I’ll pass it around to some other people here to see if they have any other ideas.

I can’t see anything wrong with your code, and had a similar issue which I resolved (although not entirely sure how).

Does the dashboard.feed route work if you call it from somewhere else?