ionic-framework icon indicating copy to clipboard operation
ionic-framework copied to clipboard

Ionic v2: platform.on is marked private, and doesn't accept any arguments

Open boaz-chen opened this issue 10 years ago • 1 comments

Hi there,

I'm trying to listen to cordova lifecycle events (resume specifically) as described here: https://forum.ionicframework.com/t/running-in-background-to-running-in-foreground/17741, but unfortunately, the documentation for this method claims it's private, and currently doesn't accept any arguments.

Are there any plans on supporting that? If not, what is the recommended way to listen to cordova lifecycle events?

Thanks, Boaz

Which Ionic Version? v2

Cordova CLI: 6.0.0 Ionic Version: 2.0.0-beta.3 Ionic CLI Version: 2.0.0-beta.19 Ionic App Lib Version: 2.0.0-beta.9 ios-deploy version: 1.8.5 ios-sim version: Not installed OS: Mac OS X El Capitan Node Version: v5.7.1 Xcode version: Xcode 7.2.1 Build version 7C1002

boaz-chen avatar Mar 16 '16 19:03 boaz-chen

There has been an API change and the on method no longer exists. We also recently added events for backbutton and exitApp if that helps: https://github.com/driftyco/ionic/commit/156fdc35ed551977f5c015e408fd72e866fea703#diff-9b766d33086364a7b9078264fee84f82L295

adamdbradley avatar Apr 11 '16 02:04 adamdbradley