本文整理汇总了TypeScript中ionic-angular.ModalController.create方法的典型用法代码示例。如果您正苦于以下问题:TypeScript ModalController.create方法的具体用法?TypeScript ModalController.create怎么用?TypeScript ModalController.create使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ionic-angular.ModalController
的用法示例。
在下文中一共展示了ModalController.create方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: openModal
openModal(characterNum: any) {
let modal = this.modalCtrl.create(DashboardGroupAddPage, characterNum);
modal.onDidDismiss(() => {
this.initDashboard();
});
modal.present();
}
示例2: if
this.storage.get('userLoginInfo').then((userLoginInfo) => {
if (userLoginInfo != null) {
let detModal =this.modalCtrl.create('CartPage');
detModal.onDidDismiss((response) => {
if(response!=undefined){
if(response.type=='bulk'){
this.navCtrl.setRoot('BulkPage',response);
}else if(response.type=='checkout'){
this.navCtrl.setRoot('CheckoutPage',response);
}
else if(response.type=='normal'){
this.navCtrl.setRoot('NormalPage',response);
}else{
this.navCtrl.setRoot('HomePage')
}
}else{
this.storage.get('cartData').then((data) => {
this.cartCount = data.length;
});
}
});
detModal.present();
}else{
this.navCtrl.setRoot('LoginPage');
}
})
示例3: switch
this.events.subscribe('incomingDataMenu.showMenu', data => {
if (!this.modalIsOpen) {
this.modalIsOpen = true;
let modal = this.modalCtrl.create(IncomingDataMenuPage, data);
modal.present();
modal.onDidDismiss(data => {
this.modalIsOpen = false;
switch (data.redirTo) {
case 'AmountPage':
this.sendPaymentToAddress(data.value, data.coin);
break;
case 'AddressBookPage':
this.addToAddressBook(data.value);
break;
case 'OpenExternalLink':
this.goToUrl(data.value);
break;
case 'PaperWalletPage':
this.scanPaperWallet(data.value);
break;
default:
this.activate();
}
});
}
});
示例4: addCategory
addCategory() {
let modal = this.modalController.create(AddEditCategoryModal);
modal.data.budgetId = this.budget.id;
modal.present();
}
示例5: goLogin
/**
* 打开登录窗口去登录
* @param callBack
*/
goLogin(callBack) {
let modal = this.modalCtrl.create(LoginPage);
modal.present();
modal.onDidDismiss(userInfo => {
callBack(userInfo);
});
}
示例6: openNotificationModal
public openNotificationModal(n: any): void {
let wallet = this.profileProvider.getWallet(n.walletId);
if (n.txid) {
this.navCtrl.push(TxDetailsPage, { txid: n.txid, walletId: n.walletId });
} else {
let txp = _.find(this.txps, {
id: n.txpId
});
if (txp) {
let modal = this.modalCtrl.create(TxpDetailsPage, { tx: txp }, { showBackdrop: false, enableBackdropDismiss: false });
modal.present();
}
else {
this.onGoingProcessProvider.set('loadingTxInfo');
this.walletProvider.getTxp(wallet, n.txpId).then((txp) => {
let _txp = txp;
this.onGoingProcessProvider.clear();
let modal = this.modalCtrl.create(TxpDetailsPage, { tx: _txp }, { showBackdrop: false, enableBackdropDismiss: false });
modal.present();
}).catch((err) => {
this.onGoingProcessProvider.clear();
this.logger.warn('No txp found');
let title = this.translate.instant('Error');
let subtitle = this.translate.instant('Transaction not found');
this.popupProvider.ionicAlert(title, subtitle);
});
}
}
};
示例7: openFinishModal
private openFinishModal() {
let modal = this.modalCtrl.create(FinishModalPage, { finishText: this.successText }, { showBackdrop: true, enableBackdropDismiss: false });
modal.present();
modal.onDidDismiss(() => {
this.close();
})
}
示例8: deleteDb
deleteDb() {
let modal = this.modalCtrl.create(ModalConfirmation, {'contentMessage' : 'Are you to delete the database ?'});
modal.onDidDismiss(result => {
console.log("result ", result);
if(result === 'yes') {
this.recipeService.deleteDb()
.then(response => {
this.alert(null, 'Deleted successfully, reload the app')
this.recipeService.initDB();
}).catch(reason => {
console.error('error to delete', reason)
this.alert('Error', 'Error to delete the db')
});
}
});
modal.present();
}
示例9: openChat
openChat(userChat: any) {
let modal = this.modalCtrl.create(ChatPage, userChat);
modal.onDidDismiss(() => {
this.ionViewWillEnter();
});
modal.present();
}
示例10: openWarningModal
public openWarningModal(): void {
let BackupWarningModal = this.modalCtrl.create(BackupWarningModalPage, {}, { showBackdrop: false, enableBackdropDismiss: false });
BackupWarningModal.present({ animate: false });
BackupWarningModal.onDidDismiss(() => {
this.navCtrl.push(BackupGamePage, { walletId: this.walletId, fromOnboarding: this.fromOnboarding });
});
}