0

In my bower.json in the root of my angular app, there is:

"dependencies": {
"angular": "^1.4.0",
"angular-animate": "^1.4.0",

I then remove all the content in the folder "bower_components", which is where all the bower stuff will be downloaded.

I then run

bower install

I can see:

bower angular-animate#^1.4.1    cached https://github.com/angular/bower-angular-animate.git#1.5.9
bower angular-animate#^1.4.1  validate 1.5.9 against https://github.com/angular/bower-angular-animate.git#^1.4.1
bower angular#^1.4.0            cached https://github.com/angular/bower-angular.git#1.5.9
bower angular#^1.4.0          validate 1.5.9 against https://github.com/angular/bower-angular.git#^1.4.0

When I look at the downlaoded files I see:

In angular.js:

* @license AngularJS v1.4.14

In angular-animate.js

* @license AngularJS v1.5.9

Now, angular-animate.js gives a strange error with toFixed function. I heard that by having this two libraries at the same version would make the error disappear. Thats why Imtrying to have them at the same version. But it is till trying to add different versions then those I specified in bower.json. Why?

1
  • 1
    You're using ^ in the version number which tells bower it can take version higher than the one provided. Commented Dec 5, 2016 at 15:32

1 Answer 1

1
"dependencies": {
"angular": "^1.4.0",
"angular-animate": "^1.4.0",

Using ^ tells bower to look for any valid version at or greater than x.x.x

If you want a specific version, you must omit the ^

"dependencies": {
"angular": "1.4.0",
"angular-animate": "1.4.0",
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.