It uses a less hacky version of the richard solution (using setClass instead of timeout).
http://plnkr.co/edit/lIfPq2acHUu9Va6gou05?p=preview
var myApp = angular.module('myApp', ['ngAnimate']); myApp.controller('Controller', function ($scope) { }); myApp.directive('animated', ['$animate', '$window', function ($animate, $window) { return function (scope, element, attrs) { scope.animate = function() { $animate.addClass(element, 'fadeInDown') .then(function() { $animate.setClass(element, 'fadeOutDown', 'fadeInDown'); scope.$digest(); }); }; }; }]);
source share