Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

timeout not working #88

Open
hosseinjalili opened this issue Jul 26, 2017 · 1 comment
Open

timeout not working #88

hosseinjalili opened this issue Jul 26, 2017 · 1 comment

Comments

@hosseinjalili
Copy link

[1] bug report

  • What is the current behavior?
    ToastyConfig.timeout when set not happening to Toast

  • What is the expected behavior?
    when set timeout hide toast on that time in ms or s

  • Angular version: 4.3.0
  • Browser: all
@erickpazzim
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants