當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。