Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to exit app using ionic 4 on app load when it doesnt find internet?

how can i exit my app when it doesnt find internet? I want it to show the user a dialog box "No internet conncetion", and a ok button when pressed, it closes the app. Thanks

like image 209
Belitho Xavier Avatar asked Mar 07 '19 16:03

Belitho Xavier


1 Answers

this.platform.exitApp() seems to be removed from ionic version 4. Try:

navigator['app'].exitApp();

p.

like image 167
Pietro Molina Avatar answered Oct 22 '22 04:10

Pietro Molina