$ionicLoading does not hide after changing state


I wanted to try the $ionicLoading service. I configured the ‘hideOnStateChange’ to true so when changing the state, if the loading is on, it will be hidden automatically.

$ionicLoading.show({noBackdrop: false, hideOnStateChange: true});

It worked with my first state change, but when showing up the loading again, it never stopped (hide) when arriving to the next state.

I am probably missing something about that field. What exactly mean “when navigating to a new state”. My understanding was if I change the state from the ui-router, it is a state change.

Another thing. When I start the second time the $ionicLoading, I change the state, but it is a directive that is displayed. Does it change something?


You have to call


some where in your controller

So what is the use of the “hideOnStateChange”?

You may check out this bug and there’s also a PR fix.