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


TypeScript ionic-angular.Loading類代碼示例

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


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

示例1: loginUser

  loginUser(){
 
    if (!this.loginForm.valid){
      console.log(this.loginForm.value);
    } else {
      this.authData.loginUser(this.loginForm.value.email, this.loginForm.value.password).then( authData => {
        this.nav.setRoot(HomePage);
      }, error => {
        let alert = Alert.create({
          message: error.message,
          buttons: [
            {
              text: "Ok",
              role: 'cancel'
            }
          ]
        });
        this.nav.present(alert);
      });
      let loading = Loading.create({
        dismissOnPageChange: true,
      });
      this.nav.present(loading);
    }
  }
開發者ID:aymenlaadhari,項目名稱:GerTunMobPactIonic,代碼行數:25,代碼來源:login.ts

示例2: presentLoadingDefault

  presentLoadingDefault() {
    this.loading = Loading.create({
      content: 'Please wait...'
    });

    this.navCtrl.present(this.loading);
  }
開發者ID:artman202,項目名稱:tangent-app,代碼行數:7,代碼來源:login.ts

示例3: hideLoading

 public hideLoading(): Promise<any> {
   return (this.loading && this.loading.dismiss().then(() => {
     this.loading = null;
   })) || new Promise((resolve, reject) => resolve({})).then(() => {
     this.loading = null;
   });
 }
開發者ID:PoompisekK,項目名稱:myWork,代碼行數:7,代碼來源:app-loading.service.ts

示例4: validateLoginCode

  validateLoginCode() {
    let loading = Loading.create({
      content: "正在查找...",
    });

    this.nav.present(loading);

    this.loginService.validateLoginCode(this.loginCode)
    .then(data => {
      this.response = data;
      if(this.response.hash){
        this.firstName = this.response.first_name; 
        this.lastName = this.response.last_name; 
        this.loginCodeCorrect = true;
        this.config.set('HASH', this.response.hash);
        this.local.set('HASH', this.response.hash);
      } else {
        this.firstName = ""; 
        this.lastName = ""; 
        this.codeIncorrect('密碼錯誤', '請確認後重試');    
        this.loginCodeCorrect = false;
      }
      this.isHandling = false;
      loading.dismiss();
    });
  }
開發者ID:eongoo,項目名稱:leader,代碼行數:26,代碼來源:login.ts

示例5: register

 register(email, password){        
     let loading = Loading.create({
        content: 'Criando usuário...' ,
        dismissOnPageChange: true
     });
     
     this._navController.present(loading);
     
     var $this = this;
     this.angularFire.auth.createUser({
         email: email,
         password: password
     }).then(function(userData){
       loading.dismiss();
       $this._viewController.dismiss();
     }, function(error){
       loading.dismiss();
       console.error('Erro', error);
       let alert = Alert.create({
         title: 'Ops :(',
         subTitle: 'Não consegui te cadastrar, tente mais tarde !',
         buttons: ['OK']
       });
     
       $this._navController.present(alert);
     });
 }
開發者ID:mateusmcg,項目名稱:tv-show-reminder-app,代碼行數:27,代碼來源:register-modal.ts

示例6: startLoading

 startLoading(loadingCtrl: LoadingController)
 {
   this.loading = loadingCtrl.create({
     content: '請稍候...'
   });
   this.isLoading = true;
   this.loading.present();
 }
開發者ID:qwb0920,項目名稱:ionic2-GGDream,代碼行數:8,代碼來源:ISSPage.ts

示例7:

 .catch ( (err: AuthError) => {
   console.log(err);
   this.analytics.trackEvent('Login', 'Submit', 'Failed');
   this.loading.dismiss().then( () => {
     if (err) {
       if (err.message === 'passwordExpired') {
         this.updatePassword(user.value.email, user.value.password)
         .then(() => {
           console.log('UpdatePassword resolved');
           this.navCtrl.setRoot('HomePage');
         })
         .catch(() => {
           console.log('UpdatePassword rejected');
         });
         return;
       }
       const alert = this.alertCtrl.create({
         message: this.translateService.instant(err.message),
         buttons: [
           {
             text: 'Ok',
             role: 'cancel'
           }
         ]
       });
       alert.present();
     }
   });
 });
開發者ID:meumobi,項目名稱:infomobi,代碼行數:29,代碼來源:login.ts

示例8: loginUser

 loginUser(){
   if (!this.loginForm.valid){
     console.log(this.loginForm.value);
   } else {
     this.authData.loginUser(this.loginForm.value.email, this.loginForm.value.password)
     .then( authData => {
       this.navCtrl.setRoot(HomePage);
     }, error => {
       this.loading.dismiss().then( () => {
         let alert = this.alertCtrl.create({
           message: error.message,
           buttons: [
             {
               text: "אישור",
               role: 'ביטול'
             }
           ]
         });
         alert.present();
       });
     });
 
     this.loading = this.loadingCtrl.create({
       dismissOnPageChange: true,
     });
     this.loading.present();
   }
 }
開發者ID:aviel829,項目名稱:aroume,代碼行數:28,代碼來源:login.ts

示例9: if

 this.events.subscribe('wordpress:savestatus', (state) => {
   console.log(state);
   if (state.state === 'saving') {
     this.loader.present();
     console.log('saving');
   }
   else if (state.state === 'error') {
     this.loader.dismiss();
     this.createLoader();
     this.toastCtrl.create({ message: 'Error Saving Report', duration: 3000 }).present();
   }
   else if (state.state === 'finished') {
     this.loader.dismiss();
     this.createLoader();
     console.log('finished');
   }
 });
開發者ID:qwb0920,項目名稱:wp-rest-api-ionic2,代碼行數:17,代碼來源:report.ts


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