我無法理解ngAnimate
的工作原理。這是我的疑問。如何使用ngAnimate製作簡單動畫
1)ngAnimate
- 僅適用於directives
?
2)如何使ng-animate
工作沒有directive
3)以上任何方式,如何添加回調animation
完成後?
因爲我看到所有animation
示例僅與directives
。
我在這裏有一個小演示,任何一個幫助我動畫都沒有directive
和directive
方法來簡單地添加一個類名稱爲'淡入'?
我的代碼:
<div class="container" ng-app="myApp">
<div class="content" ng-controller="count">
<h1 ng-click="animate()">Click ME</h1>
<h2>Let me Fade</h2>
</div>
</div>
<div class="container" ng-app="myApp">
<div class="content" ng-controller="count">
<h1 ng-click="animate()">Click ME</h1>
<h2>Let me Fade</h2>
</div>
</div>
我的場景如何實現'callback'函數? – 3gwebtrain