Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/powerbi/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Angularjs ngAnimate不工作_Angularjs_Ng Animate - Fatal编程技术网

Angularjs ngAnimate不工作

Angularjs ngAnimate不工作,angularjs,ng-animate,Angularjs,Ng Animate,我试图学习如何将ngAnimate与ngRepeat一起使用,但在我的示例中,项目只是显示出来,而不是在中设置动画 我包括了ngAnimate,将其作为依赖项放在模块中,为我的ngRepeat提供了一个item类,并创建了以下内容 .item-ng-enter { position: relative; opacity: 0.0; height: 0; left: 10px; } .item-ng-enter.item-ng-enter-active { transition

我试图学习如何将ngAnimate与ngRepeat一起使用,但在我的示例中,项目只是显示出来,而不是在中设置动画

我包括了ngAnimate,将其作为依赖项放在模块中,为我的ngRepeat提供了一个item类,并创建了以下内容

.item-ng-enter {
  position: relative;
  opacity: 0.0;
  height: 0;
  left: 10px;
}
.item-ng-enter.item-ng-enter-active {
  transition: all 0.5s ease;
  opacity: 1.0;
  left: 0;
  height: 18px;
} 

Plnkr:

首先,Angular添加了
。ng enter
。ng enter active
类,因此
。项目ng enter
。项目ng enter active
不正确。第二件事是在
.ng animate
类中添加过渡定义,该类在任何其他角度类之前添加:

.item.ng-animate{转换:所有0.5s轻松;}