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


TypeScript ToastController.create方法代码示例

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


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

示例1: logEvent

  logEvent(event) {
    if ( this.description && this.value ) {
      let saved = this.events.publish('saveItem', this.description, this.value );
      if (saved) {
        var toast = this.toastCtrl.create({
          message: 'Datos guardados',
          duration: 3000
        });
        this.description = "";
        this.value = "";
      } else {
        var toast = this.toastCtrl.create({
          message: 'Ocurrio un problema al guardar',
          duration: 3000
        });
      }
      toast.present();
    } else {
      let alert = this.alertCtrl.create({
        subTitle: 'La descripciĂłn y el valor son obligatorios',
        buttons: ['OK']
      });
      alert.present();
    }

  }
开发者ID:LuisEstebanArango,项目名称:cuentas-app,代码行数:26,代码来源:home.ts

示例2: register

 register(event){
   if(!event.error){
     this.toast.create({
       message: 'account create : '+ event.result.email,
       duration: 3000
     }).present();
   }else{
       this.toast.create({
       message: event.error.message,
       duration: 3000
     }).present();
   }
 }
开发者ID:windKusanagi,项目名称:BEEP,代码行数:13,代码来源:register.ts

示例3:

 this.afAuth.authState.subscribe(data => {
   if (data && data.email && data.uid) {
     this.toast.create({
       message: `Welcome to Mitogen, ${data.email}`,
       duration: 3000
     }).present();
   }
   else {
     this.toast.create({
       message: `Could not find authentication details.`,
       duration: 3000
     }).present();
   }
 })
开发者ID:StefBuys,项目名称:mitogen1,代码行数:14,代码来源:home.ts

示例4:

 .catch(() => {
   this.toastCtrl.create({
     message: 'Decryption unsuccessful',
     duration: 3000,
     position: 'top'
   }).present();
 });
开发者ID:Darkmarus,项目名称:blog,代码行数:7,代码来源:password.ts

示例5: show

 //Mensagem que aparece no bottom(rodapĂŠ)
 show(msg, duracao){
   const toast = this.toastCtrl.create({
     message: msg,
     duration: duracao
   });
   return toast;
 }
开发者ID:victtors,项目名称:ionic-firebase-easyodonto,代码行数:8,代码来源:toastr-service.ts

示例6: ionViewDidEnter

 ionViewDidEnter() {
   let toast = this.toastCtrl.create({
     message: 'This does not actually send a support request',
     duration: 3000
   });
   toast.present();
 }
开发者ID:jgw96,项目名称:ionic-conference-app,代码行数:7,代码来源:support.ts

示例7:

 .then(post=>{
   let toast = this.toastCtrl.create({
   message: 'Your post has been crreated',
   duration: 3000
 });
 toast.present();
 })
开发者ID:amangupta1990,项目名称:devChat,代码行数:7,代码来源:newForm.ts

示例8: onPaymentSuccess

    async onPaymentSuccess() {

        let loading = this.loadingCtrl.create({
            content: 'Please wait...'
        });
        loading.present();

        await this.getTabNavByIndex(0).popToRoot({ animate: false })
        await this.selectTab(1);
        await this.getTabNavByIndex(1).push(TicketPage, {}, { animate: false });

        let ticket = this.createFakeTicket();
        this.store.dispatch(new actionsTicket.LoadSuccessAction([ticket]));
        this.store.dispatch(new actionsTicket.SelectAction(ticket.id));
        this.store.dispatch(new actionsUi.RootChangeTabAction(1));

        await loading.dismiss();

        this.toastCtrl.create({
            message: "Congrats! You have purchased tickets.",
            duration: 3000,
            position: "bottom",
            dismissOnPageChange: true,
            showCloseButton: true,
            closeButtonText: "OK",
        }).present();

        this.viewCtrl.dismiss();
    }
开发者ID:qwb0920,项目名称:movieapp-ionic,代码行数:29,代码来源:payment.ts

示例9:

 this.fcm.listenToNotifications().subscribe((msg) => {
   const toast = this.toastCtrl.create({
     message: msg.body,
     duration: 3000
   });
   toast.present();
 });
开发者ID:inamit,项目名称:bigidea,代码行数:7,代码来源:login.ts

示例10:

 loading.onDidDismiss(() => {
   let toast = this.toastCtrl.create({
     message: 'No faces detected, please try again',
     duration: 2000
   });
   toast.present();
 });
开发者ID:jgw96,项目名称:ionic-mood,代码行数:7,代码来源:home.ts


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