当前位置: 首页>>代码示例>>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;未经允许,请勿转载。