angular度js未知提供者错误angular-animate

在删除bower_components并清理caching后,我使用bower install重新安装了依赖项。 应用程序未能加载以下错误未捕获的错误:[$ injector:unpr]未知提供者:$$ forceReflowProvider < – $$ forceReflow < – $$ animateQueue < – $ animate < – $ compile < – $$ animateQueue

这是我的bower.json

{ "name": "angular-zolo", "version": "0.0.0", "dependencies": { "angular": "1.4.3", "json3": "~3.3.1", "es5-shim": "~3.0.1", "bootstrap-sass-official": "~3.1.1", "bootstrap": "~3.1.1", "angular-resource": ">=1.2.*", "angular-cookies": ">=1.2.*", "angular-sanitize": ">=1.2.*", "angular-bootstrap": "~0.11.0", "font-awesome": ">=4.1.0", "lodash": "~2.4.1", "angular-socket-io": "~0.6.0", "angular-ui-router": "~0.2.15", "angular-material": "master", "material-date-picker": "~1.1.7", "ng-table": "~0.7.1", "md-data-table": "*", "ngstorage": "~0.3.7", "ng-file-upload": "~6.0.4", "velocity": "~1.2.2", "nprogress": "~0.2.0" }, "devDependencies": { "angular-mocks": ">=1.2.*", "angular-scenario": ">=1.2.*" }, "resolutions": { "angular-material": "master", "angular": "~1.4.0", "lodash": "~3.9.3" } } 

Angular-animate不在你的bower.json文件中,:)安装它:

 bower install angular-animate --save 

为了强调Olivier在评论中所说的内容,请确保您的angular度和angular度animation版本保持同步。

从bower.json

  "dependencies": { "angular": "~1.4.6", "angular-animate": "~1.4.6", 

不同步

  "dependencies": { "angular": "~1.4.0", "angular-animate": "~1.4.6", 

与版本> = 1.4.4的angular-animate有相同的问题。 使用版本1.4.3,直到在未来版本中修复。

我解决了它安装angularanimation像这样:

 bower install angular-animate#xxx 

xxx是等于angular度版本的版本号。