Page 1 of 1

toast not showing

Posted: 11 Dec 2020, 02:59
by anurat
I followed the documentation but still couldn't get toast to work.

mitt is installed.
has app.use(ToastService)
Then import Toast and tried to call $toast on mounted

Code: Select all

  mounted() {
    this.$toast.add({
      severity: 'success',
      summary: 'Info message',
      detail: 'Message content',
      life: 3000,
      group: 'bl'
    })
  }
It looks like it gets called but nothing is shown on the screen.

Re: toast not showing

Posted: 13 Dec 2020, 01:38
by simersim
add

Code: Select all

<Toast /> 
into your html
its show in tutorial video on 15:57, but the instructions do not mention this

Re: toast not showing

Posted: 14 Dec 2020, 17:01
by anurat
Thank you @simersim for your reply.

I added <Toast /> but still nothing showed.
Other components work fine.

I also would like to provide more info that I use laravel mix to compile.

Re: toast not showing

Posted: 28 Jan 2021, 09:06
by tugce.kucukoglu
Hi,
Hope this piece of code could help https://oo9qe.csb.app/

Best Regards,

Re: toast not showing

Posted: 22 Mar 2021, 07:29
by sushant shiwakoti
For Toast message to appear, you have to import toast service in main.js file. I had the same problem but when i imported Toast Service my toast message started to pop up.
I hope this helps.