• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

TypeScript ionic-angular.ToastController类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: presentToast

  private presentToast(success: boolean, response: any): void {
    const message: string = success
      ? 'Transaction successfully broadcast. Trasaction id: ' + response.txid
      : 'An error occurred: ' + response;
    if (this.toast) {
      this.toast.dismiss();
    }

    this.toast = this.toastCtrl.create({
      message,
      position: 'bottom',
      showCloseButton: true,
      dismissOnPageChange: true
    });
    this.toast.present();
  }
开发者ID:bitpay,项目名称:bitcore,代码行数:16,代码来源:broadcast-tx.ts


示例2: identify

  identify(phone){
    // this.item['note'] = phone;//把手机号码传回去
    // console.log(this.item)
    console.log(phone);
    let toast = this.toastCtrl.create({
      message: '修改成功',
      duration: 1500,
      position: 'middle'
    });
    toast.present();
    toast.onDidDismiss(() => {
      console.log('Dismissed toast');
      this.viewCtrl.dismiss(phone);
    });

  }
开发者ID:lany9527,项目名称:NEWS,代码行数:16,代码来源:modify-phone.ts


示例3: presentToast

  presentToast() {
    let toast = this.toastCtrl.create({
      message: 'Thank You, You Will Be Notified!',
      duration: 3000,
      position: 'bottom',
      showCloseButton: true,
      closeButtonText: 'Ok',
      dismissOnPageChange: true
    });

    toast.onDidDismiss(()=>{
      console.log('Dismissed Toast');
    });
    toast.present();

  }
开发者ID:maazkabir,项目名称:trackomed,代码行数:16,代码来源:care.ts


示例4:

 this.sw.updates.subscribe(res => {
   if (res.type === 'pending') {
     let toast = this.toastCtrl.create({
       message: 'A new version is available, reload ',
       closeButtonText: "Reload",
       showCloseButton: true,
     });
     toast.onDidDismiss((data, role) => {
       if (role === 'close') {
         this.sw.activateUpdate(res.version)
           .subscribe(value => value && location.reload());
       };
     });
     toast.present();
   }
 });
开发者ID:pinkasey,项目名称:activegan,代码行数:16,代码来源:service-worker.ts


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


示例6: handleError

  handleError(error: any) {
    let message: string;
    if (error.status && error.status === 401) {
      message = 'Login failed';
    }
    else {
      message = `Unexpected error: ${error.statusText}`;
    }

    const toast = this.toastCtrl.create({
      message,
      duration: 5000,
      position: 'bottom'
    });

    toast.present();
  }
开发者ID:Darkmarus,项目名称:blog,代码行数:17,代码来源:login.ts


示例7:

        data => {
          loading.dismissAll();

          if (data === undefined && data.fileasbase64 == undefined) {
            let toast = this.toastController.create({
                            message: 'Unable to get file content',
                            duration: 3000,
                            position: 'middle'
                          });
            toast.present();
          }
          else {
             
             this.openDocument(item.name, data.mimeType, data.fileAsBase64);
             //open(cordova.file.applicationDirectory + item.url, '_blank', 'location=no,enableViewPortScale=yes');
          }
      },
开发者ID:letuthanhson,项目名称:ionic,代码行数:17,代码来源:counterparty-ca.ts


示例8: toastShowWithOptions

    toastShowWithOptions(options: ToastOptions) {
        if (this.isMobile()) {
            this.toast.showWithOptions(options).subscribe(
                toast => {
                }
            );
        } else {
            let toast = this.toastCtrl.create({
                message: options.message,
                duration: options.duration,
                position: options.position
            });

            toast.present();
        }

    }
开发者ID:qwb0920,项目名称:LlgApp,代码行数:17,代码来源:NativeService.ts


示例9:

   data => {
     loading.dismissAll();
     this.caFileList = data;
     if (this.caFileList === undefined || this.caFileList.length === 0) {
       let toast = this.toastController.create({
                       message: 'Credit Review documents are not available for the counterparty',
                       duration: 3000,
                       position: 'middle'
                     });
       toast.present();
     }
     else {
       //this.showCaActionSheet();  //For this version there is only Action Items.  Let's go directly
       //open the list of documents for the cp
       this.navCtrl.push(CounterpartyCaPage,
           { "counterpartyName": this.cpInfo.name, "documents": this.caFileList });
     }
 },
开发者ID:letuthanhson,项目名称:ionic,代码行数:18,代码来源:counterparty-info.ts


示例10:

    this.http.get(api.url + '/users/forLikes/'+user_id+'/0', api.setHeaders(true)).subscribe(data => {
    loading.dismiss();
    this.users = data.json().users.items;
    this.texts = data.json().texts;


            // If there's message, than user can't be on this page
            if (data.json().arenaStatus) {
                let toast = this.toastCtrl.create({
                    message: data.json().arenaStatus,
                    showCloseButton: true,
                    closeButtonText: 'אישור'
                });

                toast.present();
                this.navCtrl.push(ChangePhotosPage);
            }
    });
开发者ID:interdate,项目名称:SheDate-iOS,代码行数:18,代码来源:arena.ts



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
TypeScript ionic-angular.ViewController类代码示例发布时间:2022-05-25
下一篇:
TypeScript ionic-angular.Toast类代码示例发布时间:2022-05-25
热门推荐
热门话题
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap