How to identify application start / close in ionic

Hello Champs,

Could you please let me know if there are any way to identify application start / close in ionic.

I need to do certain activity when application closed and start in iOS.

Regards,
Suhas

I have similar problem.
I use the resume and pause events and some lines on end of the controller to init things.

//on app resume
$ionicPlatform.on('resume', function(){
	console.log('on resume');
});

//on app paused
$ionicPlatform.on('pause', function(){
	console.log('on pause'); 
});
		
//do initial things here

What exactly do you want to do?