当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript ModalController.create方法代码示例

本文整理汇总了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();
 }
开发者ID:aglo35,项目名称:Pace,代码行数:7,代码来源:dashboard.ts

示例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');
     }
 })
开发者ID:GunaUI,项目名称:Pure,代码行数:26,代码来源:home.ts

示例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();
       }
     });
   }
 });
开发者ID:bitjson,项目名称:copay,代码行数:26,代码来源:scan.ts

示例4: addCategory

  addCategory() {
    let modal = this.modalController.create(AddEditCategoryModal);
    modal.data.budgetId = this.budget.id;

    modal.present();

  }
开发者ID:RyanHow,项目名称:free-budget,代码行数:7,代码来源:budget.ts

示例5: goLogin

 /**
  * 打开登录窗口去登录
  * @param callBack
  */
 goLogin(callBack) {
   let modal = this.modalCtrl.create(LoginPage);
   modal.present();
   modal.onDidDismiss(userInfo => {
     callBack(userInfo);
   });
 }
开发者ID:chinazzlm,项目名称:ionic2-case-app,代码行数:11,代码来源:Helper.ts

示例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);
        });
      }
    }
  };
开发者ID:bitjson,项目名称:copay,代码行数:30,代码来源:activity.ts

示例7: openFinishModal

 private openFinishModal() {
   let modal = this.modalCtrl.create(FinishModalPage, { finishText: this.successText }, { showBackdrop: true, enableBackdropDismiss: false });
   modal.present();
   modal.onDidDismiss(() => {
     this.close();
   })
 }
开发者ID:bitjson,项目名称:copay,代码行数:7,代码来源:txp-details.ts

示例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();

    }
开发者ID:eliasjunior,项目名称:weekMenu,代码行数:25,代码来源:settings.component.ts

示例9: openChat

 openChat(userChat: any) {
   let modal = this.modalCtrl.create(ChatPage, userChat);
   modal.onDidDismiss(() => {
     this.ionViewWillEnter();
   });
   modal.present();
 }
开发者ID:SPL-201620,项目名称:SocialBike,代码行数:7,代码来源:contact.ts

示例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 });
   });
 }
开发者ID:bitjson,项目名称:copay,代码行数:7,代码来源:backup-warning.ts


注:本文中的ionic-angular.ModalController.create方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。