使用Angular JS 1.4.x的Angular UI-bootstrap

时间:2015-07-13 09:32:48

标签: angularjs angular-ui angular-ui-bootstrap bower bower-install

我在我的项目中使用Angular 1.4.x.我需要使用UI-bootstrap。但我在文档中看到了这一点:

•AngularJS(需要AngularJS 1.3.x,使用1.3.13进行测试)。 0.12.0是此库的最后一个版本,支持AngularJS 1.2.x。

这是否意味着我需要将我的Angular版本降级到1.3.x?或者有办法解决这个问题吗?

bower.json:

{
  "name": "boiler",
  "description": "Boiler automation",
  "version": "0.0.1",
  "homepage": "",
  "license": "",
  "private": true,
  "dependencies": {
    "angular": "~1.4.x",
    "angular-mocks": "1.4.x",
    "jquery": "~2.1.1",
    "bootstrap": "~3.1.1",
    "angular-route": "1.4.x",
    "angular-ui-router": "~0.2.15",
    "angular-bootstrap": "~0.13.0",
    "angular-animate": "~1.4.x"
  }
}

在bower安装上获得以下错误:

bower cached        git://github.com/angular-ui/bootstrap-bower.git#0.13.0
bower validate      0.13.0 against git://github.com/angular-ui/bootstrap-bower.g
it#~0.13.0
bower cached        git://github.com/angular/bower-angular.git#1.4.2
bower validate      1.4.2 against git://github.com/angular/bower-angular.git#~1.
4.x
bower cached        git://github.com/angular/bower-angular.git#1.4.2
bower validate      1.4.2 against git://github.com/angular/bower-angular.git#>=
1.0.8
bower cached        git://github.com/angular/bower-angular.git#1.4.1
bower validate      1.4.1 against git://github.com/angular/bower-angular.git#1.4
.1
bower cached        git://github.com/angular/bower-angular-animate.git#1.4.2
bower validate      1.4.2 against git://github.com/angular/bower-angular-animate
.git#~1.4.x
bower cached        git://github.com/angular/bower-angular.git#1.4.2
bower validate      1.4.2 against git://github.com/angular/bower-angular.git#1.4
.2
bower ECONFLICT     Unable to find suitable version for angular

npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs
\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! node v0.12.2
npm ERR! npm  v2.7.4
npm ERR! code ELIFECYCLE
npm ERR! boiler@0.0.1 postinstall: `bower install`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the boiler@0.0.1 postinstall script 'bower install'.
npm ERR! This is most likely a problem with the boiler package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     bower install
npm ERR! You can get their info via:
npm ERR!     npm owner ls boiler
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     C:\Users\sreehari.puliyakkot\projects\boiler\npm-debug.log

1 个答案:

答案 0 :(得分:0)

你需要版本0.12.1它是唯一支持角度1.4的版本:

https://github.com/angular-ui/bootstrap/issues/3633#issuecomment-120455274