Know when transition to current state finished?


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.


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

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

    // Do stuff here.