@noxdigital wrote:
Hello,
I’m under Ionic v4, and I would like to exit the application from JavaScript.
All solutions found on this forum or on Google doesn’t seems to works:ionic.Platform.exitApp()
=> ERROR in src/app/home/home.page.ts(69,5): error TS2304: Cannot find name ‘ionic’this.platform.exitApp()
=> ERROR in src/app/home/home.page.ts(71,10): error TS2339: Property ‘platform’ does not exist on type ‘HomePage’.navigator[‘app’].exitApp()
=> compilation OK, but in JS the navigator[‘app’] is undefinedI’ve also tried the plugin cordova-plugin-exit, but the author doesn’t known how this could works with Ionic v4
I need a solution that works from Android 5.0 please. Thanks for your help!
Posts: 2
Participants: 2