I'm trying to add a directive that animates the element when it is clicked, but the code in my directive never seems to trigger.
html:
<img class="refresh" animate-spin src="refresh-icon-614x460.png">
js:
myApp.directive('animateSpin', ['$animate', function($animate) {
return function(element, scope, attrs) {
element.on('click', function() {
$animate.addClass(element, 'spin');
});
};
}]);