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


TypeScript Loading.create方法代碼示例

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


在下文中一共展示了Loading.create方法的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1: openPage

  openPage(page) {
    // Reset the content nav to have just this page
    // we wouldn't want the back button to show in this scenario

    console.log(this.nav);


    if(page === 'Ajustes'){
      this.nav.push(Ajustes,{
        "tit":'Ajustes',
        "section":'Ajustes',
        "translator":this.translator_object
      });

    }else if(page.idTypeItem === 1011){
     if(this.platform.is('ios')){
        InAppBrowser.open('https://itunes.apple.com/in/app/incidencias-velez-malaga/id990970923?mt=8','_system','location=yes'); 
     }else if(this.platform.is('android')){
        InAppBrowser.open('https://play.google.com/store/apps/details?id=com.gecor.VelezMalaga','_system','location=yes'); 
     }
      
    }else if(page.idTypeItem === 1015){
    
    this.loading = Loading.create({content:''});
      this.nav.present(this.loading);
      setTimeout(() =>{
        this.nav.push(page.component,{
        "tit":this.translator_object[localStorage.getItem('lang')]['SELECCIONA_PLAYA'],
        "section":this.pages[0].section,
        "index":this.pages[0].idx,
        "estados": this.estados,
        "idTypeItem": page.idTypeItem,
        "translator":this.translator_object,
        "loading": this.loading,
        "typeItems" : this.typeItems
      });
      },100)
  
    }else{
     this.loading = Loading.create({content:''});
      this.nav.present(this.loading);
      setTimeout(() =>{
        this.nav.push(page.component,{
        "tit":page.title,
        "section":page.section,
        "index":page.idx,
        "estados": this.estados,
        "idTypeItem": page.idTypeItem,
        "translator":this.translator_object,
        "loading": this.loading,
        "typeItems" : this.typeItems
      });
      },100)
      
    }

  };
開發者ID:GECOR,項目名稱:playas-velez,代碼行數:57,代碼來源:inicio.ts

示例2: 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

示例3: ionViewDidEnter

 ionViewDidEnter() {
   let loading = Loading.create({
     content: 'Getting Jobs...'
   });
   this.navController.present(loading).then(() => {
     this.storiesService.getJobStories()
       .subscribe(
       (data: any) => {
         data.forEach((id: any) => {
           this.storiesService.getStory(id)
             .subscribe(
             (data: any) => {
               console.log(data);
               this.jobs.push(data);
               loading.dismiss();
             },
             (err: Error) => {
               console.log(err);
             }
             );
         });
       },
       (err: Error) => {
         console.log(err);
       }
       );
   });
 }
開發者ID:jgw96,項目名稱:Ionic2-Hacker-News,代碼行數:28,代碼來源:about.ts

示例4: btnSearchByIdOrder

 btnSearchByIdOrder() {
   let loading = Loading.create({
     content: "Buscando...",
   });
   this.nav.present(loading);
   this.callService.searchByIdOrder(this.idOrder).subscribe(
     data => {
       console.log('si');
       loading.dismiss();
       if (data.doc.length > 0) {
         this.details = data.doc;
       } else {
         let toast = Toast.create({
           message: 'No hay resultados, intente con otro "numero de orden", o revise que este bien escrito el "numero de orden" que esta buscando',
           duration: 10000,
           position: 'bottom',
           showCloseButton: true,
           closeButtonText: 'ok'
         });
         this.nav.present(toast);
       }
     },
     err => {
       loading.dismiss();
       console.log('no');
     },
     () => {
       loading.dismiss();
       console.log('Search Complete');
       this.idOrder = '';
     }
   );
 }
開發者ID:Andr3sit0,項目名稱:HerraduraApp,代碼行數:33,代碼來源:search-by-id-order.ts

示例5: getCurrentLocation

  getCurrentLocation(): Observable<google.maps.LatLng> {
    
    let loading = Loading.create({
      content: 'Locating...'
    });
    
    this.nav.present(loading);
    
    let options = {timeout: 10000, enableHighAccuracy: true};
    
    let locationObs = Observable.create(observable => {
      
      Geolocation.getCurrentPosition(options)
        .then(resp => {
          let lat = resp.coords.latitude;
          let lng = resp.coords.longitude;
          
          let location = new google.maps.LatLng(lat, lng);
          
          console.log('Geolocation: ' + location);
          
          observable.next(location);
          
          loading.dismiss();
        },
        (err) => {
          console.log('Geolocation err: ' + err);
          loading.dismiss();
        })

    })
    
    return locationObs;
  }
開發者ID:cyberabis,項目名稱:Ionic-2-Uber,代碼行數:34,代碼來源:map.ts

示例6: searchForMovie

  searchForMovie(searchbar) {

    var q = searchbar.value;

    if (q.trim() == '') {

      this.movieService
          .getAllMovies()
          .then(data => {

            this.movies = data;
          })

    } else {

      let loading = Loading.create({ content: "Searching for movies..." });
      this.navController.present(loading);

      this.movieService
          .searchForMovie(q)
          .then(data => {

            loading.dismiss();
            this.movies = data;
          })
    }
  }
開發者ID:joshdurbin,項目名稱:movie-ratings-demo-mobile,代碼行數:27,代碼來源:list-of-movies.ts

示例7: showLoading

 /**
  * shows simple html content loading overlay
  */
 showLoading() {
     let loading = Loading.create({
         content: "<h4>Loading</h4> content <small style='color: red;'>with</small> html <b>TAGS</b>",
         duration: 3000
     });
     this.nav.present(loading);
 }
開發者ID:ramoncarreras,項目名稱:loading_content,代碼行數:10,代碼來源:home.ts

示例8: fillStories

 private fillStories() {
   let loading = Loading.create({
     content: 'Getting Stories...',
   });
   this.nav.present(loading).then(() => {
     this.stories = [];
     this.storiesService.getStories()
       .subscribe(
       (stories: any[]) => {
         for (let i = 0; i < 20; i++) {
           let id = stories[i];
           this.storiesService.getStory(stories[i])
             .subscribe(
             (data: any) => {
               this.stories.push({ data: data, id: id });
               loading.dismiss();
               this.storiesRetreived = this.stories;
             }
             );
         }
       },
       (err: Error) => console.error(err)
       );
   });
 }
開發者ID:jgw96,項目名稱:Ionic2-Hacker-News,代碼行數:25,代碼來源:home.ts

示例9: resetPassword

  resetPassword(credentials) {
    let loading = Loading.create({
      content: "Please wait.."
    });
    this.navCtrl.present(loading);

    let ref = this;
    // this.ref.resetPassword({
    //   email: credentials.email
    // }, function(error) {
    //   if (error) {
    //     switch (error.code) {
    //       case "INVALID_USER":
    //         ref.error = "Este usuário não existe.";
    //         break;
    //       default:
    //         ref.error = error;
    //         break;
    //     }
    //     loading.dismiss();
    //   } else {
    //     ref.error = "Em breve você irá receber um e-mail com uma nova senha temporária.";
    //     loading.dismiss();
    //   }
    // });
  }
開發者ID:ciekawy,項目名稱:ionic2-angularfire-login,代碼行數:26,代碼來源:forgot-password.ts

示例10: presentLoading

 presentLoading() {
     let loading = Loading.create({
         content: "Please wait...",
         duration: 3000
     });
     this.nav.present(loading);
 }
開發者ID:Muhammadmavia,項目名稱:ITKA,代碼行數:7,代碼來源:home.ts


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