ngAnimate $$ animateJs不是一个函数

时间:2016-01-25 15:45:04

标签: angularjs

再次帮助......

我试图使用ui-bootstrap,但模态没有动画,所以我尝试包含ngAnimate,但是我收到了这个错误:

TypeError: $$animateJs is not a function
    at prepareAnimation (angular-animate.js:2042)
    at initDriverFn (angular-animate.js:2032)
    at invokeFirstDriver (angular-animate.js:3070)
    at Array.triggerAnimationStart (angular-animate.js:2916)
    at nextTick (angular-animate.js:416)
    at scheduler (angular-animate.js:386)
    at angular-animate.js:2938
    at Scope.$digest (angular.js:16145)
    at Scope.$apply (angular.js:16359)
    at done (angular.js:10791)

这是我的bower.json:

{
  "name": "sb-admin",
  "version": "0.0.0",
  "appPath": "app",
  "dependencies": {
    "angular": "~1.4.9",
    "angular-resource": "~1.4.9",
    "angular-ui-router": "~0.2.16",
    "angular-bootstrap": "~1.1.0",
    "metisMenu": "~2.2.0",
    "angular-loading-bar": "~0.8.0",
    "font-awesome": "~4.5.0",
    "requirejs": "~2.1.22",
    "bootstrap": "~3.3.6",
    "oclazyload": "ocLazyLoad#~1.0.9",
    "lodash": "~4.0.1",
    "angular-smart-table": "~2.1.6",
    "angular-google-maps": "~2.3.0",
    "angular-simple-logger": "~0.1.5",
    "angular-toggle-switch": "~1.3.0",
    "angular-animate": "1.4.9"
  },
  "resolutions": {
    "angular-bootstrap": "~1.1.0",
    "angular": ">=1.2.0",
    "lodash": "~4.0.1"
  }
}

一些想法?

1 个答案:

答案 0 :(得分:0)

我遇到了同样的问题,看一下我看到的文档(https://github.com/angular-ui/bootstrap):

角度要求

UI Bootstrap 1.0及更高版本需要Angular 1.4.x或更高版本,并且已经使用Angular 1.4.8进行了测试。

所以我在我的“bower.json”文件中将角度版本降级到1.4.8,现在我不再收到错误消息了。