Javascript 使用AngularJS捕捉animationstart和animationend事件
我目前正在开发一个基于角度的应用程序,它使用多个过渡/动画。尽管我使用jQuery成功捕获了事件Javascript 使用AngularJS捕捉animationstart和animationend事件,javascript,angularjs,css-animations,Javascript,Angularjs,Css Animations,我目前正在开发一个基于角度的应用程序,它使用多个过渡/动画。尽管我使用jQuery成功捕获了事件animationstart和animationend,但我仍然无法使用Angular来完成。我尝试使用以下语法,但没有结果: $scope.$on('webkitAnimationStart', function(){ console.log("animation start caught") }); 有办法吗?也许使用ngAnimate?我无法重现您的示例,所以。。。猜测。它不是
animationstart
和animationend
,但我仍然无法使用Angular来完成。我尝试使用以下语法,但没有结果:
$scope.$on('webkitAnimationStart', function(){
console.log("animation start caught")
});
有办法吗?也许使用ngAnimate?我无法重现您的示例,所以。。。猜测。它不是由
$scope
发出的,因此您的方法不起作用。angular.element($window).on('animationstart'
工作吗?