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


TypeScript Loading.dismiss方法代码示例

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


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

示例1: checkAllLoaded

 checkAllLoaded() {
   if (this.areNeedsRetrieved && this.areResponsesRetrieved) {
     this.mungedNeeds = this.needs
       .map((n) => {
         const responses = this.responses
           .filter((r) => r.needId === n.id)
           .map((r) => {
             return {
               ...r,
               formattedCreationDate: new Date(r.creationDate).toLocaleDateString(),
               mailLink: `mailto:${r.email}?subject=Thanks for your offer to help with "${htmlDecode(n.description)}"`
             }
           })
         return {
           ...n,
           responses: responses,
           hasResponses: responses.length > 0,
           responsesLabel: responses.length === 1
             ? `${responses.length} response`
             : `${responses.length} responses`
         }
       })
     this.loader.dismiss()
   }
 }
开发者ID:StreetSupport,项目名称:streetsupport-app,代码行数:25,代码来源:needs.ts

示例2: uploadPhoto

  async uploadPhoto(imageFileUri: any): Promise<void> {
    this.myPhoto = imageFileUri;

    this.error = null;
    this.loading = this.loadingCtrl.create({
      content: 'Uploading...'
    });

    await this.loading.present();

    const fileTransfer: FileTransferObject = this.transfer.create();

    const fileEntry = await this.file.resolveLocalFilesystemUrl(imageFileUri);

    const options: FileUploadOptions = {
      fileKey: 'file',
      fileName: fileEntry.name,
      headers: {}
    };

    try {
      const result = await fileTransfer.upload(imageFileUri, 'http://192.168.178.84:8080/upload', options);
      console.log(result.bytesSent);
      console.log(result.responseCode);
      this.showToast(true);
    }
    catch (e) {
      console.log(e);
      this.showToast(false);
    }
    finally {
      this.loading.dismiss();
    }
  }
开发者ID:ralscha,项目名称:attic,代码行数:34,代码来源:home.ts

示例3:

        this.geolocation.getCurrentPosition().then((position) => {

            let latLng = new google.maps.LatLng(position.coords.latitude, position.coords.longitude);

            let mapOptions = {
                center: latLng,
                zoom: 15,
                mapTypeId: google.maps.MapTypeId.ROADMAP
            }

            this.map = new google.maps.Map(this.mapElement.nativeElement, mapOptions);

            this.addMarkers();

            this.addMyMarker();

            /*let myMarker = new google.maps.Marker({
                map: this.map,
                animation: google.maps.Animation.DROP,
                position: latLng,
            });

            let myContent = "IO";

            this.addInfoWindow(myMarker, myContent);*/

            this.loading.dismiss()
            console.log('fine caricamento mappa')

        }, (err) => {
开发者ID:creattico,项目名称:petrolcompany2,代码行数:30,代码来源:mappa.ts

示例4:

 .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

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

示例6: resolve

        .subscribe(data => {
          // we've got back the raw data, now generate the core schedule data
          // and save the data for later reference

          //dismiss the loader and return response back.
          this.loading.dismiss().then(() => resolve(data));

        }, (error) => {
开发者ID:snowflakekiller,项目名称:ionic2-common-rest-provider-sample,代码行数:8,代码来源:common-rest-provider.ts

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

示例8: dismissLoading

 //noinspection TypeScriptUnresolvedVariable
 dismissLoading(): Promise<any> {
   if(this.loading) {
     return this.loading.dismiss().then(() => this.loading = null);
   } else {
     //noinspection TypeScriptUnresolvedFunction
     return new Promise(func => func());
   }
 }
开发者ID:packowitz,项目名称:ask-the-people,代码行数:9,代码来源:notification.service.ts

示例9:

 (err)=>{
   let alert = Alert.create({
     title : "Couldn't get your info",
     subTitle : "You can't continue right now, Try again later",
     buttons:['Will check it out']
   });
   this.loading.dismiss();
   this.nav.present(alert);
 }
开发者ID:ujjwal996,项目名称:campChatIonic,代码行数:9,代码来源:login.ts


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