Angular 1.4 new ngAnimate breaks toastr?
See original GitHub issueI’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() {
Issue Analytics
- State:
- Created 8 years ago
- Comments:20 (7 by maintainers)
Top Results From Across the Web
Enter/leave animation not working in 1.4.4 #12612 - GitHub
If you bump angular and angular-animate to 1.4.4 on the plunker, no animation (the ng-enter classes and stuff are not applied).
Read more >node_modules/ngx-toastr/toastr/toast-noanimation.component ...
I've solve it by changing the toastr version in the package.json. ... ngx-toastr Angular 6.5.0 4.x 8.10.2 5.x 10.1.0 8.x 7.x 6.x 11.3.3...
Read more >AngularJS 1.4.x and Angular Toastr custom properties not ...
var app = angular.module('plunker', ['toastr']); app.config(function(toastrConfig) { angular.extend(toastrConfig, { autoDismiss: false, ...
Read more >ngAnimate - AngularJS: API
The ngAnimate module provides support for CSS-based animations (keyframes and transitions) as well as JavaScript-based animations via callback hooks.
Read more >Test Angular-Toastr - JSFiddle - Code Playground
Support the development of JSFiddle and get extra features ✌ ; 1: toastr ; success(subtitle ; title,{});break ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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!
I have done new tests with the angular-toastr@2.1.1 + angular-animate@1.5.8 and it worked correctly for me.
Thanks!