我无法从按钮中删除动画类。
CODE
.directive('animateTrigger', ['$animate', function ($animate) {
return function (scope, elem, attrs) {
elem.on('click', function () {
elem.addClass("animated zoomIn")
});
$animate.removeClass(elem, "animated zoomIn")
}
}])
动画仅在第一次运作。
除此之外,我试过这个但没有帮助
.directive('animateTrigger', function ($animate) {
return {
scope: true,
link: function (scope, elem, attrs) {
elem.on('click', function () {
$animate.addClass(elem, "animated zoomIn", function () {
elem.removeClass("animated zoomIn")
scope.$apply();
});
});
}
};
})