Closed wawyed closed 6 years ago
Are you trying to use $animateCss
programmatically? Why not just tap into the callback promise?
$animateCss(element, options).start().then(callback);
My original issue was that I was using $animate.on to listen for an addClass event on an element to defer an action after the animation was finished (focusing another element). It was working fine with $animate.addClass but the library that added that class to the element (angular ui bootstrap) changed the approach by using $animateCss({addClass: 'in'}).
This is how the code looks like on the directive:
https://github.com/angular-ui/bootstrap/blob/master/src/modal/modal.js#L209
I managed to get around it by submitting a PR to ui.bootstrap to defer the focus of the modal after the animation has finished.
Although this doesn't change the fact that it would make sense for $animateCss to trigger those events according to what the docs say about $animate.on. What do you think?
I think that's definitely something we could consider for 1.6
This is not going to make it, sorry.
According to documentation:
$animate.on
Would it be possible to notify $animateCss phases as well?