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


TypeScript Toast.present方法代码示例

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


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

示例1: toasterFail

    public toasterFail(mensagem: string, showCloseButton: boolean = true, duration: number = null) {
        if (mensagem) {
            var toasterOptions = {
                message: mensagem, duration: duration, position: 'top',
                cssClass: 'toast-fail', showCloseButton: showCloseButton, closeButtonText: 'Ok'
            };

            this.toaster = this.toasterCtrl.create(toasterOptions);
            this.toaster.present();
        }
    }
开发者ID:FredericoGrz,项目名称:MyApp,代码行数:11,代码来源:toaster.ts

示例2: toasterSuccess

    public toasterSuccess(mensagem: string, showCloseButton: boolean = false, duration: number = 3000) {
        if (mensagem) {
            var toasterOptions = {
                message: mensagem, duration: duration, position: 'top',
                cssClass: 'toast-success', showCloseButton: showCloseButton, closeButtonText: 'Ok'
            };

            this.toaster = this.toasterCtrl.create(toasterOptions);
            this.toaster.present();
        }
    }
开发者ID:FredericoGrz,项目名称:MyApp,代码行数:11,代码来源:toaster.ts

示例3: showToast

 showToast(options: any) {
   if(this.loading) {
     //noinspection TypeScriptUnresolvedFunction
     this.dismissLoading().then(() => this.showToast(options));
   }
   if(this.toast) {
     //noinspection TypeScriptUnresolvedFunction
     this.dismissToast().then(() => this.showToast(options));
   }
   this.toast = this.toastController.create(options);
   this.toast.present();
 }
开发者ID:packowitz,项目名称:ask-the-people,代码行数:12,代码来源:notification.service.ts

示例4: create

  create(message, ok = false, duration = 2000) {
    if (this.toast) {
      this.toast.dismiss();
    }

    this.toast = this.toastCtrl.create({
      message,
      duration: ok ? null : duration,
      position: 'bottom',
      showCloseButton: ok,
      closeButtonText: 'OK'
    });
    this.toast.present();
  }
开发者ID:jctovar,项目名称:iztacala,代码行数:14,代码来源:toast-service.ts


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