• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

TypeScript ionic-angular.Loading类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了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;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
TypeScript ionic-angular.LoadingController类代码示例发布时间:2022-05-25
下一篇:
TypeScript ionic-angular.List类代码示例发布时间:2022-05-25
热门推荐
热门话题
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap