当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript ionic-angular.LoadingController类代码示例

本文整理汇总了TypeScript中ionic-angular.LoadingController的典型用法代码示例。如果您正苦于以下问题:TypeScript LoadingController类的具体用法?TypeScript LoadingController怎么用?TypeScript LoadingController使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了LoadingController类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。

示例1: ionViewDidEnter

 ionViewDidEnter() {
   let loading = this.loading.create({
     content: 'Loading items...'
   });
   loading.present();
   setTimeout(() => {
     for (let i = 0; i < 30; i++) {
       this.items.push({ name: 'ionic' });
     }
     loading.dismiss();
   }, 3000);
 }
开发者ID:jgw96,项目名称:overlay-test,代码行数:12,代码来源:page1.ts

示例2: loadUsers

 loadUsers() {
   let loading = this.loading.create({});
   loading.present().then(() => {
     this.userService.getAll()
       .then(users => {
         this.users = users;
         loading.dismiss();
       }, (error) => {
         this.users = [];
         loading.dismiss();
       });
   });
 }
开发者ID:hewerthomn,项目名称:ionic2-template-tabs,代码行数:13,代码来源:users.ts

示例3: loadPhotos

 loadPhotos() {
   let loading = this.loading.create({});
   loading.present().then(() => {
     this.photoService.getAll(this.album.id)
       .then(photos => {
         loading.dismiss();
         this.photos = photos;
       }, (error) => {
         loading.dismiss();
         this.photos = [];
       });
   });
 }
开发者ID:hewerthomn,项目名称:ionic2-template-tabs,代码行数:13,代码来源:album.ts

示例4: login

  /** If already registered then login using the following function. Check firebase and login */
  login() {

    /** Show Loading till they login */
    let loading = this.loading.create({
      content: 'Please Wait..'
    });
    loading.present();

    /** check authentication from provider */
    this.auth.loginWithEmail(this.form).subscribe(response => {
      console.log(response);
      loading.dismiss();
    })

  }
开发者ID:vishalsrini,项目名称:ionicAngularLogin,代码行数:16,代码来源:login.ts

示例5:

          handler: data => {
            console.log('Saved clicked');

            let loading = this.loadCtrl.create({
              content: "Getting songs..."
            });

            loading.present().then(() => {
              this.musicService.getFirstTracks(data.term).then((tracks) => {
                this.songs = tracks;
                loading.dismiss();
              });
            });

          }
开发者ID:jgw96,项目名称:Soundel,代码行数:15,代码来源:home.ts

示例6: feedbackSubmit

  feedbackSubmit(){
    this.loading = this.loadingCtrl.create({
      content: 'Please Wait...'
    });
    this.loading.present();
    let data = { "subject":this.subject,"remarks":this.remarks, "user_id":this.user_id,"send_file":""}
    console.log(data);
    this.apiservice.feedback(data).then((result) => {
      this.responseData = result;
      if(this.responseData.status){
        this.loading.dismiss();
        let toast = this.toastCtrl.create({
          message: 'Feedback Submitted Successfully',
          duration: 5000,
          position: 'top'
        });
        toast.present();
        this.navCtrl.setRoot(this.navCtrl.getActive().component);
      }else{
        this.loading.dismiss();
        let toast = this.toastCtrl.create({
          message: 'Error! Please send feedback again.',
          duration: 5000,
          position: 'top'
        });
        toast.present();
       
      }
    });

  }
开发者ID:Swapinfotech,项目名称:jainsampark,代码行数:31,代码来源:feedback.ts

示例7: ionViewLoaded

  ionViewLoaded() {
    console.log("Entro al catalogo");
    let loading = this.loadingController.create({
      content: "Obteniendo encuestas"
    });
    loading.present();
    this.prizeList = this.surveyProvider.getPrizesObtained(this.userData);
    loading.dismiss();
    /* 
    .then((data) => {
      this.catalog = <[Prize]>data;
      loading.dismiss();
    }, (err) => {
      loading.dismiss();
      let alert = this.alertCtrl.create({
        title: 'Equipos Pregunta',
        subTitle: 'Error al obtener encuestas',
        buttons: [{
          text: 'cancel',
          role: 'canel'

        }]
      });
      alert.present();

      console.log(err);
    });
   */

  }
开发者ID:araujomelogno,项目名称:EquiposPregunta,代码行数:30,代码来源:prize-list.ts

示例8: downloadAndInstall

 private downloadAndInstall() {
   const updating = this.loadingCtrl.create({
     content: 'Updating application...'
   });
   updating.present();
   this.deploy.download().then(() => this.deploy.extract()).then(() => this.deploy.load());
 }
开发者ID:Darkmarus,项目名称:blog,代码行数:7,代码来源:home.ts

示例9: getContacts

  getContacts(state: number) {
    if (state == 0) {
      let loading = this.loadingCtrl.create({
        spinner: 'crescent',
        content: this.lgnUsed.loader_config,
        duration: 10000
      });

      loading.present();
    }

    Contacts.find(['phoneNumbers', 'displayName'], { multiple: true, hasPhoneNumber: true, desiredFields: ['phoneNumbers', 'displayName'] })
      .then((contacts) => {
        let contactsList;
        contactsList = contacts;
        this.setPermissionCache(true);
        this.formatPhoneNumbers(contactsList);
      },
      (err) => {
        if (err) {
          console.log(err);
          err >= 0 && err <= 20 ? this.setPermissionCache(false) : null;
        }
      });
  }
开发者ID:ColinJS,项目名称:Chillter,代码行数:25,代码来源:contacts.ts

示例10: signUp

  signUp() {
    const loading = this.loadingCtrl.create({
      content: "We're creating a user for you ...."
    });
    loading.present();

    this.auth.createUser(this.form.value.email, this.form.value.password).then(() => {
      loading.dismiss();
      this.navCtrl.setRoot('tabs');
    }, (error) => {
      loading.dismiss();
      switch (error.code) {
        case 'auth/invalid-email':
          this.errorMessage = 'Please enter a valid email address.';
          break;
        case 'auth/weak-password':
          this.errorMessage = 'The password must be at least 6 characters long.';
          break;
        case 'auth/email-already-in-use':
          this.errorMessage = 'This email has already been used for another account.';
          break;
        default:
          this.errorMessage = error;
          break;
      }
      this.hasError = true;
    });
  }
开发者ID:mbibekjana,项目名称:nafisa_capital,代码行数:28,代码来源:signup.ts


注:本文中的ionic-angular.LoadingController类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。