简体   繁体   English

AngularJS ngAnimate ngView平滑淡出动画

[英]AngularJS ngAnimate ngView smooth fade out/in animation

i like to have a nice transition while i change the content of my ngView. 我希望在改变ngView的内容时有一个很好的过渡。 The user can always change the active view faster than the animation. 用户始终可以比动画更快地更改活动视图。 Is there a way to always get an smooth fade out/in animation. 有没有办法在动画中始终获得平滑的淡出效果。 The only way that is visible to seems to ignore fadeout/leave. 可见的唯一方法似乎忽略了淡出/离开。

Plunker Link Plunker Link

Try this http://plnkr.co/edit/NO0Xqh?p=preview . 试试这个http://plnkr.co/edit/NO0Xqh?p=preview

With JavaScript controlled animation, it will make sure when user clicks faster than the animation, the value animation stop in the middle and reverse back to initial states. 使用JavaScript控制的动画,它将确保当用户点击比动画更快时,值动画在中间停止并反转回初始状态。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM