我正在使用Angular 1.2.6.我正在尝试使用bower来安装
angular-animate和
ngAnimate-animate.css.我已经尝试安装(bower install –save angular-animate),从1.2.16和1.2.17卸载github上的几个时间和差异代码.
Bower一直希望安装与Angular 2.1.12兼容的旧版角度动画1.2.16.
安装角度动画后,我所有传递的业力单元测试都失败了.
我继续得到这个错误.有什么想法吗?
bower angular-animate#* cached git://github.com/angular/bower-angular-animate.git#1.2.16 bower angular-animate#* validate 1.2.16 against git://github.com/angular/bower-angular-animate.git#* bower angular#1.2.16 cached git://github.com/angular/bower-angular.git#1.2.16 bower angular#1.2.16 validate 1.2.16 against git://github.com/angular/bower-angular.git#1.2.16 bower angular#>=1 cached git://github.com/angular/bower-angular.git#1.2.16 bower angular#>=1 validate 1.2.16 against git://github.com/angular/bower-angular.git#>=1 Unable to find a suitable version for angular,please choose one: 1) angular#1.2.6 which resolved to 1.2.6 and is required by angular-cookies#1.2.6,angular-mocks#1.2.6,angular-resource#1.2.6,angular-route#1.2.6,angular-sanitize#1.2.6,angular-scenario#1.2.6,temp 2) angular#1.2.16 which resolved to 1.2.16 and is required by angular-animate#1.2.16 3) angular#>=1 which resolved to 1.2.16 and is required by angular-bootstrap#0.10.0 Prefix the choice with ! to persist it to bower.json [?] Answer:
我进入了!1和!3之前没有成功.
bower.json
{ "name": "temp","version": "0.0.0","dependencies": { "angular": "1.2.6","json3": "~3.2.6","es5-shim": "~2.1.0","jquery": "~1.10.2","bootstrap": "~3.1.1","angular-resource": "1.2.6","angular-cookies": "1.2.6","angular-sanitize": "1.2.6","angular-route": "1.2.6","angular-bootstrap": "~0.10.0","angular-toggle-switch": "~0.3.0","angular-animate": "~1.2.16","ngAnimate-animate.css": "~0.1.1" },"devDependencies": { "angular-mocks": "1.2.6","angular-scenario": "1.2.6" },"resolutions": { "angular": ">=1" } }
Angular moved angular-animate out of core to it’s own dependency in v1.2
两部分解决方案
原文链接:https://www.f2er.com/angularjs/142144.html> ngAnimate-animate有一个需要添加到文件的js文件app / bower_components / ngAnimate-animate.css / animate.js:在karma.conf.js中>凉亭信息angular-animate并安装特定于您的角度版本的版本.在这种情况下,凉亭安装角度 – 动画#1.2.6 – 保存