akserg / ng2-toasty

Angular2 Toasty component shows growl-style alerts and messages for your app.
MIT License
283 stars 102 forks source link

timeout not working #88

Open hosseinjalili opened 7 years ago

hosseinjalili commented 7 years ago

[1] bug report

erickpazzim commented 6 years ago

If you using a global error handler, try to run your toast in a zone, like this:

In constructor add: private ngZone: NgZone

Run toast in a zone: this.ngZone.run(() => { this.toastyService.error({ title: 'Error', msg: 'Error message.', theme: 'bootstrap', showClose: true, timeout: 2000 }); });

Hope this helps :D