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