2014-04-08 15 views
8

Tôi đang sử dụng Angular 1.2.6. Tôi đang cố gắng sử dụng bower để cài đặt angular-animatengAnimate-animate.css. Tôi đã thử cài đặt (bower install --save angular-animate), gỡ cài đặt một vài thời gian và mã khác trên github từ 1.2.16 đến 1.2.17.Không thể tìm thấy phiên bản phù hợp cho góc cạnh với lỗi cài đặt bower cho mô-đun góc animate

Bower giữ muốn cài đặt phiên bản cũ hơn của angular-animate 1.2.16 tương thích với Angular 2.1.12.

Tất cả các thử nghiệm nghiệp vụ nghiệp vụ của tôi đều thất bại sau khi cài đặt angular-animate.

Tôi tiếp tục gặp phải lỗi này. Bất kỳ ý tưởng tại sao?

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: 

tôi đã nhập !1!3 trước không thành công.

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" 
    } 
} 

Related question on SO.

Angular moved angular-animate out of core to it's own dependency in v1.2

Trả lời

12

Hai phần giải pháp

  1. ngAnimate-animate có một file js, app/bower_components/ngAnimate-animate.css/animate.js cần được thêm vào files: trong karma.conf.js

  2. bower info angular-animate và cài đặt phiên bản cụ thể cho phiên bản góc của bạn. Trong trường hợp này, bower install angular-animate#1.2.6 --save

Các vấn đề liên quan