PrimeNG: Growl disappears when redirect

956 Views Asked by At

I have an Edit page. On "Update" button click, it redirects to "Search" page. During redirect I also need to show "Successfully update!" message using growl, but it disappears during redirect.

I am using following code in Edit page template:

<p-growl [(value)]="msgs" ></p-growl>

The growl appears fine if I don't redirect.

1

There are 1 best solutions below

0
brianbha On

Try with timeout

setTimeout(() => {/*fire here the growl*/}, 400);

Another way is locate growl outside the router-outlet