ngAnimate 未在 ui-view 中添加 ng-enter/ng-leave 类 [英] ngAnimate not adding ng-enter/ng-leave classes inside ui-view

查看:26
本文介绍了ngAnimate 未在 ui-view 中添加 ng-enter/ng-leave 类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在网上试图找出我的问题的问题.我似乎无法弄清楚发生了什么.我们的应用程序非常庞大,所以我无法真正发布糟糕的代码.我只是需要一些指导,我已经在谷歌上搜索了几个小时相同的东西.

I have been all over the web trying to figure out the issue to my problem. I can't seem to figure out what is going on. Our application is massive so I can't really post code which sucks. I just need some direction, I've been googling the same stuff for hours.

当我向对象添加新数据时,ngAnimate 没有添加 ng-enter/ng-leave 等类.

ngAnimate is not adding the ng-enter / ng-leave etc. classes when I am adding new data to my object.

ngAnimate 在您实际向对象添加/删除数据时是否表现相同,还是仅在您过滤数据时才起作用?

Does ngAnimate act the same when you are actually adding/removing data to an object, or does it only work when you are filtering through data?

我们正在使用 ui-router,主体是 ui-view - 当我们在 ui-view 中时,ngAnimate 的行为是否相同?

We are using ui-router, and the body is the ui-view - does ngAnimate act the same when we are inside the ui-view?

简要概述 (jade) - 显然我们的应用程序中有更多代码:

Brief Overview (jade) - obviously there is a lot more code in our app:

body(ui-view)
  script(src='/main.js')
   div(ng-controller="Controller")    
     div.contain
       div.animate(ng-repeat="item in items")
         {{item.name}}

版本:

"dependencies": {
"angular": "1.3.15",
"angular-animate": "latest",
"angular-motion": "~0.4.2",
"angular-ui-router": "~0.2.13",
...

我什至直接从 plunker 复制脚本,这些脚本在 plunkrs 中没有添加 ngAnimate 类.

I've even copied scripts straight in from plunker that were working plunkrs with no luck with adding the ngAnimate classes.

这不是 CSS 问题,因为我什至没有看到在检查器中添加的类.

It's not a CSS issue because I don't even see the classes being added in the inspector.

我需要使用某个版本吗?这些需要加载的某些顺序?是否会同时禁用 ngAnimate 模块?

Is there a certain version I need to be using? Certain order these need to be loaded in? Could something be disabling the ngAnimate module all together?

非常感谢您提供任何建议.

Thank you so much in advance for any advice.

编辑——我开始认为这是我们的一个或多个组件之间的不兼容问题——有人有任何想法吗?

EDIT -- I'm beginning to think it is an incompatibility issue between one or more of our components - anybody have any ideas?

这是我们的 bower.json 文件

Here is our bower.json file

"dependencies": {
   "angular": "1.3.15",
   "angular-animate": "1.4.3",
   "angular-motion": "~0.4.2",
   "angular-ui-router": "~0.2.13",
   "angular-cookies": "1.3.10",
   "angular-moment": "latest",
   "lodash": "latest",
   "angular-facebook": "latest",
   "angular-bootstrap": "0.12.0",
   "angular-media-queries": "~0.3.0",
   "angular-slugify": "latest",
   "angular-local-storage": "~0.1.5",
   "angular-resource": "1.3.10",
   "angular-sanitize": "~1.3.10",
   "angular-touch": "~1.3.10",
   "angular-payments": "latest",
   "angular-chosen-localytics": "~1.0.7",
   "angular-lodash": "~0.1.2",
   "angular-slick": "~0.1.18",
   "angular-ui-select": "~0.9.6",
   "angular-socialshare": "~0.0.6",
   "angulartics": "~0.17.2",
   "angular-ladda": "latest",
   "ladda": "./vendor/ladda",
   "angular-gestures": "~0.3.0",
   "ryanmullins-angular-hammer": "~2.1.10",
   "angular-bootstrap-datetimepicker": "~0.3.8",
   "angular-pretty-checkable": "~0.1.5",
   "angular-loading-bar": "~0.7.0",
   "ngImgCrop": "./vendor/ngImgCrop",
   "angular-google-places-autocomplete": "~0.2.5",
   "ng-plangular": "./vendor/ng-plangular",
   "angular-timer": "./vendor/angular-timer",
   "offline": "~0.7.11",
   "angular-swing": "*",
   "angular-strap": "~2.3.1",
   "angulike": "~1.2.0",
   "angular-summernote": "~0.4.0",
   "ckeditor": "~4.5.1",
   "ng-ckeditor": "~0.2.1",
   "angular-file-upload": "~2.1.1",
   "ng-sortable": "~1.3.0"
 },
 "devDependencies": {},
 "resolutions": {
   "angular": "1.3.15"
 }

推荐答案

就我而言,我不得不将 angular-animate 降级到 1.3 版,然后它就开始工作了.

In my case I had to downgrade angular-animate to version 1.3 and it started working.

这篇关于ngAnimate 未在 ui-view 中添加 ng-enter/ng-leave 类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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