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


TypeScript Loading.present方法代碼示例

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


在下文中一共展示了Loading.present方法的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的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.navCtrl.setRoot('HomePage');
      }, error => {
        this.loading.dismiss().then( () => {
          let alert = this.alertCtrl.create({
            message: error.message,
            buttons: [
              {
                text: "Ok",
                role: 'cancel'
              }
            ]
          });
          alert.present();
        });
      });

      this.loading = this.loadCtrl.create({
        dismissOnPageChange: true,
      });
      this.loading.present();
    }
}
開發者ID:iacapuca,項目名稱:mausmotoristas,代碼行數:28,代碼來源:login.ts

示例2: showLoading

 private showLoading(): Loading {
   let loading: Loading = this.loadingCtrl.create({
     content: "Por favor aguarde... Entrando"
   });
   loading.present();
   return loading;
 }
開發者ID:dekonunes,項目名稱:ConneCT-App,代碼行數:7,代碼來源:home.ts

示例3: signupUser

    /**
     * If the form is valid it will call the AuthData service to sign the user up password displaying a loading
     *  component while the user waits.
     *
     * If the form is invalid it will just log the form value, feel free to handle that as you like.
     */
    signupUser(){
	if (!this.signupForm.valid){
	    console.log(this.signupForm.value);
	} else {
	    this.auth.signup(this.signupForm.value.email, this.signupForm.value.password)
		.then(() => {
		    this.navCtrl.setRoot('HomePage');
		}, (error) => {
		    this.loading.dismiss().then( () => {
			var errorMessage: string = error.message;
			let alert = this.alertCtrl.create({
			    message: errorMessage,
			    buttons: [
				{
				    text: "Ok",
				    role: 'cancel'
				}
			    ]
			});
			alert.present();
		    });
		});

	    this.loading = this.loadingCtrl.create({
		dismissOnPageChange: true,
	    });
	    this.loading.present();
	}
    }
開發者ID:rajesh241,項目名稱:libtech,代碼行數:35,代碼來源:signup.ts

示例4: uploadPhoto

  async uploadPhoto(imageFileUri: any): Promise<void> {
    this.myPhoto = imageFileUri;

    this.error = null;
    this.loading = this.loadingCtrl.create({
      content: 'Uploading...'
    });

    await this.loading.present();

    const fileTransfer: FileTransferObject = this.transfer.create();

    const fileEntry = await this.file.resolveLocalFilesystemUrl(imageFileUri);

    const options: FileUploadOptions = {
      fileKey: 'file',
      fileName: fileEntry.name,
      headers: {}
    };

    try {
      const result = await fileTransfer.upload(imageFileUri, 'http://192.168.178.84:8080/upload', options);
      console.log(result.bytesSent);
      console.log(result.responseCode);
      this.showToast(true);
    }
    catch (e) {
      console.log(e);
      this.showToast(false);
    }
    finally {
      this.loading.dismiss();
    }
  }
開發者ID:ralscha,項目名稱:attic,代碼行數:34,代碼來源:home.ts

示例5:

 handler: data => {
   this.loading = this.loadingCtrl.create({
     dismissOnPageChange: true,
   });
   if (this.isValid(data.email)) {
     this.loading.present();
     this.authService.forgotPassword(data.email)
     .then(
       () => {
         this.loading.dismiss().then(() => {
           this.meuToastService.present(this.translateService.instant('RESET_PASSWORD.SUCCESS'));
         });
       }
     )
     .catch(
       err => {
         this.loading.dismiss().then(() => {
           this.meuToastService.present(this.translateService.instant('RESET_PASSWORD.ERROR'));
         });
       }
     );
   } else {
     this.meuToastService.present(this.translateService.instant('Invalid Email'));
     return false;
   }
 }
開發者ID:meumobi,項目名稱:infomobi,代碼行數:26,代碼來源:login.ts

示例6: present

  /**
   * แสดงข้อความขณะกำลังโหลดข้อมูล
   * @param message ข้อความที่แสดง
   * 
   */
  public present(message: string = 'กรุณารอสักครู่...'): void {

    this.loading = this.create({
      content: message
    });
    this.loading.present();
  }
開發者ID:warozz,項目名稱:D3VMobiz,代碼行數:12,代碼來源:loading.ts

示例7: scopePresent

 public scopePresent(message: string = 'กรุณารอสักครู่...') {
   let loading = this.create({
     content: message
   });
   loading.present();
   return loading;
 }
開發者ID:warozz,項目名稱:D3VMobiz,代碼行數:7,代碼來源:loading.ts

示例8: loginWithGoogle

    loginWithGoogle() {
        this.auth.loginWithGoogle().then( authData => {
	    this.navCtrl.setRoot('HomePage');
	    console.log(authData);
	    console.log(authData.user);
	    
	    let user = {
		email: authData.user.email,
		displayName: authData.user.displayName,
		photoURL: authData.user.photoURL
	    }
	    this.postLogin(user);
	}, error => {
	    this.loading.dismiss().then(() => {
		let alert = this.alertCtrl.create({
		    message: error.message,
		    buttons: [
			{
			    text: "Ok",
			    role: 'cancel'
			}
		    ]
		});
		alert.present();	
	    });
	});
	
	this.loading = this.loadingCtrl.create({
	    content: "Logging in...",
	    dismissOnPageChange: true,
	});

	this.loading.present();
    }
開發者ID:rajesh241,項目名稱:libtech,代碼行數:34,代碼來源:login.ts

示例9: loginUser

 loginUser(): void {
   if (!this.loginForm.valid) {
     console.log(this.loginForm.value);
   } else {
     this.authProvider.loginUser(this.loginForm.value.email,
       this.loginForm.value.password)
       .then(authData => {
         this.loading.dismiss().then(() => {
           this.navCtrl.setRoot(TabsPage);
         });
       }, error => {
         this.loading.dismiss().then(() => {
           let alert = this.alertCtrl.create({
             message: 'Benutzer und Passwort stimmen nicht überein!',
             buttons: [
               {
                 text: "Ok",
                 role: 'cancel'
               }
             ]
           });
           alert.present();
         });
       });
     this.loading = this.loadingCtrl.create();
     this.loading.present();
   }
 }
開發者ID:getlabs,項目名稱:bretapp,代碼行數:28,代碼來源:login.ts

示例10: startLoading

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


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