Peter Nixey
Peter Nixey

Reputation: 16565

How I decide what version of Angular and dependencies I should be using?

How are you supposed to decide on version numbers for the different packages in Angular?

My bower.json file looks like this:

{
  "name": "Plan The World",
  "dependencies": {
    "angular": "1.2.7-build.2029+sha.80e7a45",
    "angular-resource": "1.2.7-build.2029+sha.80e7a45",
    "angular-ui-sortable": "angular1.2",
    "angular-route": "1.2.7-build.2029+sha.80e7a45",
    "angular-bootstrap": "master",
    "angular-cookies" : "master",
    "angular-animate": "~1.2.x",
    "jquery-file-upload": "9.5.0",
    "alertify": "0.3"
  },
  "resolutions": {
    "angular": "1.2.7-build.2029+sha.80e7a45"
  }
}

and I've currently got a problem which is I believe being caused by the angular-animate package being out of sync with the others. However I don't have a clue how to resolve this or what versions to start changing.

What's the right way to deal with all of these different package versions? In my Rails gemfile I generally don't specify versions unless I have to - is there a similar way to go for Angular and bower?

Upvotes: 1

Views: 173

Answers (1)

pkozlowski.opensource
pkozlowski.opensource

Reputation: 117370

You should always use the same version of AngularJS packages (angular-). Today all those files are published / released from the same source tree and don't have independent life-cycle.

For example you seem to mixing versions of angular-animate (~1.2.x) with angular (1.2.7-build.2029+sha.80e7a45). You should use the same version for both files (and for all the files from the AngularJS distribution for that matter).

I'm not sure if there is a way of avoiding repetition the version for each file, though.

Upvotes: 2

Related Questions