Why I can't use $route in my controller?

I have some trouble with the slider update, it doesn’t work sometimes, even though with timeout.
So I want to reload all the view instead by $route.reload(), according to this post:

However, when I inject $route to my Controller, I got a Unknown Provider error:

Does any one know what’s the problem?

Ionic doesn’t use $Route anymore, it’s been using UI Router since 0.9.26.

Check out http://angular-ui.github.io/ui-router/site/#/api/ui.router.state.$state for more information on how to change views programatically.

Thanks, coen​_​warmer.
I found this, but this just reload the state, not the view. It still doesn’t solve my problem.
I want some way to reload the view. Just like you refresh a page in browser.
Any idea?

AFAIK for most intents and purposes a state is the same as a view (please correct me if I’m wrong).

Have you tried this?

1 Like