$animator's animate(el) could (should) return a promise
this isn't really an issue, but I'm new to gitHub and I do not know where I should share this idea. Sorry for that. instead of returning nothing, it could return a promise. So we could do in a directive something like : var animator = $animator(scope, attrs); animator.animate('firstCustomAnimationEvent', el) .then(function(){ doSomething(); animator.animate('secondCustomAnimationEvent', el); }); the animate function could wait for the animation to finish to return the promise. Wouldn't it be awesome ? Maybe there's already a way to do just that but I can't figure it out for now.
1.2 supports callbacks. But the callbacks for now are temporary feature until promises are taken out of the $scope and $digest cycle. Then a promise can be returned that isn't dependent on the internals of AngularJS. That's the plan.
OK, thank you a lot matsko !
Closing this for now. This is definitely in the plans for 2.0.