當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript Nav.present方法代碼示例

本文整理匯總了TypeScript中ionic-angular.Nav.present方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript Nav.present方法的具體用法?TypeScript Nav.present怎麽用?TypeScript Nav.present使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在ionic-angular.Nav的用法示例。


在下文中一共展示了Nav.present方法的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1: showLoginPage

 showLoginPage(done) {
   let modal = Modal.create(LoginPage);
   modal.onDismiss((user) => {
     // 觸發回調函數
     done && done(user);
   });
   this.nav.present(modal);
 }
開發者ID:baijiadu,項目名稱:auktionator,代碼行數:8,代碼來源:app.ts

示例2: checkWeb

 checkWeb(nav: Nav) {
   if (Network.connection == 'none') {
     let toast = Toast.create({
       message: 'No connection.',
       //duration: 10000,
     });
     nav.present(toast);
   } 
 }
開發者ID:faithandrel,項目名稱:geo-sched-mobile,代碼行數:9,代碼來源:schd-error-handler.ts

示例3: showSchdError

  showSchdError(theError: any, nav: Nav) {
    let toast = Toast.create({
      message: JSON.stringify(theError),
      duration: 3000,
    });
    
    nav.present(toast);

  }
開發者ID:faithandrel,項目名稱:geo-sched-mobile,代碼行數:9,代碼來源:schd-error-handler.ts

示例4: updateUserAlert

 private updateUserAlert():void {
     let alert = Alert.create({
         title: 'User Information Updated',
         buttons: [
             {
                 text: 'Okay'
             }
         ]
     });
     this._navController.present(alert);
 }
開發者ID:marenwoodruff,項目名稱:m2,代碼行數:11,代碼來源:user-settings.component.ts

示例5: switch

    this.events.subscribe('openNotification', (data) => {
      const {extras} = data[0];
      let statusNames, statusName, modal;

      switch (extras.code) {
        case '100': // 拍賣師收到拍品審核請求
        case '106': // 拍賣師收到拍品審核請求
          statusNames = {'100':  'pending', '106':  'ended'};
          statusName = statusNames[extras.code];
          modal = Modal.create(AkProductsPage, {statusName: statusName, notifyProductId: extras.pid});
          this.nav.present(modal);
          break;
        case '101': // 賣家收到拍品審核通過
        case '102': // 賣家收到拍品審核不通過
        case '103': // 賣家收到拍品被上架
          statusNames = {'101':  'processing', '102':  'ended', '103': 'online'};
          statusName = statusNames[extras.code];
          modal = Modal.create(OwnerProductsPage, {statusName: statusName, notifyProductId: extras.pid});
          this.nav.present(modal);
          break;
      }
    });
開發者ID:baijiadu,項目名稱:auktionator,代碼行數:22,代碼來源:app.ts

示例6: deleteUserError

  private deleteUserError(): void {
     let alert = Alert.create({
      title: 'Woops!',
      subTitle: 'An error occurred and your account cannot be deleted at this time. Please try again later.',
      buttons: [
        {
          text: 'OK',
          handler: () => {

          }
        }
      ]
    });
    this._navController.present(alert);
  }
開發者ID:marenwoodruff,項目名稱:m2,代碼行數:15,代碼來源:user-settings.component.ts

示例7: userDeleted

 private userDeleted(): void {
   this._authService.logOut();
    let alert = Alert.create({
     title: 'Deleted!',
     subTitle: 'Your account has been deleted. Please note that if you wish to unregister for an event you must do so through the email that which you used to register.',
     buttons: [
       {
         text: 'OK',
         handler: () => {
           this._navController.setRoot(LoginPage);
         }
       }
     ]
   });
   this._navController.present(alert);
 }
開發者ID:marenwoodruff,項目名稱:m2,代碼行數:16,代碼來源:user-settings.component.ts

示例8: deleteUser

 private deleteUser():void {
   let confirm = Alert.create({
     title: 'Delete your account?',
     message: 'Are you sure you wish to delete your account? This will not unregister you from any registered events',
     buttons: [
       {
         text: 'Disagree',
         handler: () => {
           console.log('Disagree clicked');
         }
       },
       {
         text: 'Agree',
         handler: () => {
           this.deletingUser = true;
           this._userService.deleteUser(this.user.id);
         }
       }
     ]
   });
   this._navController.present(confirm);
 }
開發者ID:marenwoodruff,項目名稱:m2,代碼行數:22,代碼來源:user-settings.component.ts

示例9: saveAlert

 private saveAlert(userEvent) {
   let alert = Alert.create({
     title: 'Saving Event',
     subTitle: 'Saving this event does not mean that you are registered. Please click the information button for registration instructions.',
     buttons: [
       {
         text: 'Save',
         handler: () => {
           this._userEventApi.createUserEvent(this.userId, userEvent);
           this.registered = true;
         }
       },
       {
         text: 'Cancel',
         handler: () => {
           this.registered = false;
         }
       }
     ]
   });
   this.nav.present(alert);
 }
開發者ID:marenwoodruff,項目名稱:m2,代碼行數:22,代碼來源:event.component.ts

示例10: confirmFriendRegistration

 confirmFriendRegistration() {
   let confirmFriend = Alert.create({
     title: 'Registration Confirmation',
     message: 'Thank you for registering! You will receive an e-mail to confirm your registration for this event.',
     buttons: [
       {
         text: 'Confirm',
         handler: () => {
           // form.submit();
           this.backToEvents();
         }
       },
       {
         text: 'Cancel',
         role: 'cancel',
         handler: () => {
           console.log('cancel registration');
         }
       }
     ]
   });
   this.nav.present(confirmFriend);
 }
開發者ID:marenwoodruff,項目名稱:m2,代碼行數:23,代碼來源:friend-registration.component.ts


注:本文中的ionic-angular.Nav.present方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。