Suspend/Resume event of app

Hello, Can some one explain how to handle suspend/Resume events using PhoneGap/ionic?

Any input on this please?

Have a look at this post:

You need to setup Cordova’s ‘resume’ and ‘pause’ event handlers.
http://cordova.apache.org/docs/en/3.5.0/cordova_events_events.md.html

I do this in my app.js module .run function:

$document.on("resume", function( event ) {
    // do stuff with your $rootScope such as this:
    $rootScope.$broadcast('myCordovaResumeEvent');
});

Then listen to your “myCordovaResumeEvent” in your controllers. I am using $document, Angular’s abstraction of document. I am assuming it plugs into Angular digest cycles some how.