Know when transition to current state finished?


#1

What is the proper to get notified when ionic finished translate to a current state?
I’m adding this piece of code to the controller that bind to the current state:

$scope.$on("$stateChangeSuccess", function () { /* my code */ })

but look like it doesn’t get fired at all.


#2

That is the correct code. Are you sure that controller is getting accessed?

$scope.$on('$stateChangeSuccess', function(){

    // Do stuff here.

});