1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | 1 2 2 3 1 1 1 | 'use strict'; module.exports = function ($animate) { return { restrict: 'EA', link: function (scope, element, attributes) { scope.$watch(attributes.animateChange, function (newVal, oldVal) { if (newVal !== oldVal) { $animate.addClass(element, attributes.changeClass) .then(function () { return $animate.removeClass(element, attributes.changeClass); }); } }); } }; }; module.exports.$inject = ['$animate']; |