4

我在 Ionic 5 系统中找不到关闭应用程序的方法。看起来在 Ionic 4 中执行此操作的方法不适用于 Ionic 5。有可能吗?

4

1 回答 1

5
closeApp() { 
    this.platform.backButton.subscribeWithPriority(999999, () => { 
    navigator['app'].exitApp();
    // or trigger any action you want to achieve
    }) //Amended missing a closing bracket
}
于 2020-04-07T10:46:41.590 回答