AngularJS 错误:未知提供者:$animateProvider <- $animate [英] AngularJS Error: Unknown provider: $animateProvider <- $animate

查看:34
本文介绍了AngularJS 错误:未知提供者:$animateProvider <- $animate的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

未捕获的错误:[$injector:unpr] 未知提供者:$animateProvider <- $animate

Uncaught Error: [$injector:unpr] Unknown provider: $animateProvider <- $animate

我正在尝试使用此链接中给出的 Angular-ui 创建轮播.http://angular-ui.github.io/bootstrap/

I am trying to create a carousel using Angular-ui as given in this link. http://angular-ui.github.io/bootstrap/

但是,我得到了那个错误.

But, I get that error.

详细信息:我使用的是 .min 角度脚本文件.index.html 的代码与链接中给出的代码相同.根据这篇文章错误:未知提供者:employeesProvider <-员工,我从 html 中获取了 ng-controller,我将控制器绑定到 controller.js 中,如 angular-seed 应用程序中给出的那样.

Details: I am using a .min angular script file. The index.html has the same code as given in the link. According to this post Error: Unknown provider: employeesProvider <- employees, I took the ng-controller from the html and I'm binding the controller in the controller.js as given in the angular-seed app.

另外,http://docs.angularjs.org/error/$injector:unpr?p0=$animateProvider%20%3C-%20$animate 没有帮助我.

Also, http://docs.angularjs.org/error/$injector:unpr?p0=$animateProvider%20%3C-%20$animate did not help me.

可能是什么原因?

推荐答案

当我将 ngAnimate 引入一个使用旧版 Angular 的项目时,我也遇到了 Unknown Provider 问题.最好的办法是在项目中使用与当前 Angular 版本相同的 ngAnimate 版本.它们似乎是同时发布的.

I was getting Unknown Provider issues as well when I introduced ngAnimate into a project with an older release of Angular. Your best bet is to use the version of ngAnimate equal to the current version of Angular in your project. They seem to be released in tandem.

这篇关于AngularJS 错误:未知提供者:$animateProvider &lt;- $animate的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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