单击吐司导航到另一页

时间:2019-04-03 17:36:35

标签: angular toast ionic4

l有这个ion toast。我要实现以下内容。当用户单击烤面包通知时,事件单击将导航到特定页面。我确实尝试了下面的代码,但是没有用。

代码

const toast = await this.toastController.create({
        message: 'click on details ',
        color:'danger',
        duration:7000,
        showCloseButton:true

      });


      toast.onDidDismiss().then(()=>{
        this.nav.navigateForward('/home')
      })
       toast.present();

0 个答案:

没有答案