angular-toastr: Angular 1.4 new ngAnimate breaks toastr?
I’ll put a plunker soon (if I can replicate in a simple environment), but I updated some of my projects that use toastr to Angular 1.4 latest and I’m getting a bunch of errors if multiple toastrs are called at the same time during the resolve function of angular ui router (could this be due to the ngAnimate changes in 1.4?). Commenting out possible multiple calls to toastr fixed the issue.
Sample Error:
TypeError: Cannot read property 'end' of undefined
at queueAnimation (angular-animate.js:2338)
at Object.push (angular-animate.js:2189)
at Object.leave (angular.js:5257)
at remove (angular-toastr.tpls.js:70)
at Object.clear (angular-toastr.tpls.js:39)
at routes.js:100
at processQueue (angular.js:14745)
at angular.js:14761
at Scope.$eval (angular.js:15989)
at Scope.$digest (angular.js:15800)
In toastr using line #
$animate.leave(toast.el).then(function() {
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Comments: 20 (7 by maintainers)
I went back to the project where I could replicate the issue. I updated to angular-toastr@2.1.1, angular-animate@1.5.8, and it looks like the transitions are working correctly for me. Can’t guarantee everything is resolved since my code has changed quite a bit since, but with all the latest libs it’s working for me. Thanks guys!