同じ要素でアニメーションを作成するために animate.css を使用しています。クラスを追加した後にクラスを削除する際に問題が発生しています。
HTML
<form ng-submit="animate()" ng-controller="AnimateCtrl">
<input type='text' ng-model="some">
</form>
<div ng-class="{shake:animation.shake}" class="animated">
角度
myapp.controller(function($scope){
var animation = $scope.animation = {
shake:false
};
$scope.animate=function(){
//remove the class first and add it back again
animation.shake = false
animation.shake = true
};
})
アニメーション後にクラスを削除するにはどうすればよいですか?