本文整理匯總了TypeScript中ionic-angular.Platform.exitApp方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript Platform.exitApp方法的具體用法?TypeScript Platform.exitApp怎麽用?TypeScript Platform.exitApp使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類ionic-angular.Platform
的用法示例。
在下文中一共展示了Platform.exitApp方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: Date
this.platform.registerBackButtonAction(() => {
if (this.isMessagesOpened) {
this.isMessagesOpened = false;
return;
}
if (this.navPath.length < 1) {
if (new Date().getTime() - lastTimeBackPress < timePeriodToExit) {
this.platform.exitApp();
} else {
let toast = this.toastCtrl.create({
message: 'Press back again to exit',
duration: 3000,
position: 'bottom'
});
toast.present();
lastTimeBackPress = new Date().getTime();
}
return;
}
this.navPath.pop();
this.slide = this.navPath[this.navPath.length - 1];
this.slides.slideTo(this.slide);
this.isGoingBack = true;
});
示例2:
}).catch(e => {
let alert = this.alertCtrl.create({
title: 'Fatal Error!',
subTitle: 'Unable to get service end-point. Please contact admin.',
buttons: ['OK']
});
alert.present();
platform.exitApp();
});
示例3: terminate
terminate(event){
console.log("terminate");
this.platform.exitApp();
}
示例5: closeApp
/**
* closes the app
*/
closeApp() {
this.platform.exitApp();
LocalNotifications.clear(1);
}
示例6:
handler: data =>{
this.platform.exitApp();
}
示例7:
handler: () => {
//this.nav.push(Inicio);
this.alert = undefined;
this.platform.exitApp();
}