Check if state transition is complete

Hi,

I need the app to do something just after state or page transition is complete. How to achieve this?

take a look in the documentation of the ion-view:
http://ionicframework.com/docs/api/directive/ionView/

There are helpfully events like $ionicView.enter :wink:

Thanks, bengtler

however I failed to make $ionicView.loaded works. I put these in my controller :

$scope.$on(’$ionicView.loaded’, function () {
alert(‘loaded’);
});

or should I make route provider be abstract type? As I see the ionic tab template works, but the main tab is abstract.

You have to use:
$ionicView.enter

at this points the transition and transition animation has finished.
$ionicView.loaded is only once if you have chaching enabled.

And keep in mind that events exists only in ionic versions >= Beta14
I think the view is connected with a state -> so you need a state with uses a ion-nav-view connected with a template and controller.

Ah… I was using lower version :smile:
It works now!
Thanks, bengtler.