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.


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

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

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.