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

Does not work properly inside async callbacks #26

Open
carerakjan opened this issue Jan 15, 2017 · 1 comment
Open

Does not work properly inside async callbacks #26

carerakjan opened this issue Jan 15, 2017 · 1 comment

Comments

@carerakjan
Copy link

There is a case, when I need to launch show() after some async callback (e.g. after successfull connection to server) and $scope inside toast provider has been updated but view does not reflect this changes. So, I temporary added additional argument into show method e.g. applyAsync which tell to toast provider that it must launch $scope.$applyAsync after scope will be updated. May be it is not good decision, it would be nice if you investigate this issue more deeply. Thanks.

@jcyh0120
Copy link

jcyh0120 commented Dec 21, 2017

@carerakjan I got this problem, too. How do you solve this issue?

I put the applyAsync but no luck.

// line 83
toggleDisplayOfToast('block', 1, background, function () { $scope.$applyAsync(); if (isSticky) return; $timeout.cancel(toastTimer); toastTimer = $timeout(function () { $scope.hideToast(); }, duration); });

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