如何从代码中关闭 Ionic 5 应用程序?
How can I close an Ionic 5 app from code?
我在Ionic 5 系统中找不到关闭应用程序的方法。看起来在 Ionic 4 中执行此操作的方法不适用于 Ionic 5。
可以吗?
closeApp() {
this.platform.backButton.subscribeWithPriority(999999, () => {
navigator['app'].exitApp();
// or trigger any action you want to achieve
}) //Amended missing a closing bracket
}
我在Ionic 5 系统中找不到关闭应用程序的方法。看起来在 Ionic 4 中执行此操作的方法不适用于 Ionic 5。 可以吗?
closeApp() {
this.platform.backButton.subscribeWithPriority(999999, () => {
navigator['app'].exitApp();
// or trigger any action you want to achieve
}) //Amended missing a closing bracket
}