AngularJS ngAnimate ngView顺利淡出/动画 [英] AngularJS ngAnimate ngView smooth fade out/in animation

查看:100
本文介绍了AngularJS ngAnimate ngView顺利淡出/动画的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想有一个很好的过渡,而我改变我的ngView的内容。用户可以随时更改活动视图比动画快。有没有一种办法总是得到一个平滑的淡出/动画。这是可见的唯一方法似乎忽略淡出/离开。

i like to have a nice transition while i change the content of my 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链接

推荐答案

试试这个的http:// plnkr。 CO /编辑/ NO0Xqh?p = preVIEW

使用JavaScript的控制动画,这将确保用户点击比动画,中间值动画停止时更快和反向回到初始状态。

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.

这篇关于AngularJS ngAnimate ngView顺利淡出/动画的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆