AngularJS:采用NG-动画如何动画负载NG-重复 [英] AngularJS: How to animate ng-repeat on load using ng-animate

查看:145
本文介绍了AngularJS:采用NG-动画如何动画负载NG-重复的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

伙计!

如何获得的div使用 NG-重复下滑down..I指生长在大小负载创建。

How can I get the divs created using ng-repeat to slide down..I mean grow in size ON LOAD.

我要实现这一点使用 NG-动画和动画应该触发页面加载时。

I want to achieve this using ng-animate and the animation should trigger when the page loads.

我在看这个的例子在文档中给出​​,其中精美的动画运行你的时候筛选项目,但不是在页面加载时。

I am looking at this example given in the docs wherein the animation beautifully runs when you filter the items but not when the page loads.

我使用的1.2.0版本。

I am using version 1.2.0

一个工作拨弄或一掷将AP preciated。先谢谢了。

A working fiddle or plunk would be appreciated. Thanks in advance.

推荐答案

为了显示在页面加载NG-重复动画,目标阵列是最初为空。然后用值分配。

In order to show ng-repeat animation on page load, the target array has to be initially empty. Then assigned with values.

试试这个 http://plnkr.co/edit/mRZFFX?p=$p$pview

使用 $超时设置朋友值在以后的时间,以便在进入动漫这个演示可以被触发。

This demo used $timeout to set friends value in a later time so the enter animation can be triggered.

这篇关于AngularJS:采用NG-动画如何动画负载NG-重复的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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