Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 71531

How to exit the app please?

$
0
0

@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 undefined

I’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

Read full topic


Viewing all articles
Browse latest Browse all 71531

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>