Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get list of versions for compatible Angular 2 modules?

I have the following code in the package.json:

 "dependencies": {
    "@angular/common": "~2.0.1",
    "@angular/compiler": "~2.0.1",
    "@angular/core": "~2.0.1",
    "@angular/forms": "~2.0.1",
    "@angular/http": "~2.0.1",
    "@angular/platform-browser": "~2.0.1",
    "@angular/platform-browser-dynamic": "~2.0.1",
    "@angular/router": "~3.0.1",
    "@angular/upgrade": "~2.0.1",
    "angular-in-memory-web-api": "~0.1.1",
    "bootstrap": "^3.3.7",
    "core-js": "^2.4.1",
    "reflect-metadata": "^0.1.8",
    "rxjs": "5.0.0-beta.12",
    "systemjs": "0.19.39",
    "zone.js": "^0.6.25"
  },

I got this file from one tutorial. Now I see that I need to move to the later Angular 2 version. It is said on Angular 2 project page that 2.4.0 is the latest Angular 2 version. That is fine - but how can I get the versions for all the necessary modules that are compatible by 2.4.0? E.g. I have 3.0.1 for router and 2.0.1 for the common. What the new version numbers should be?

like image 346
TomR Avatar asked Dec 25 '16 21:12

TomR


People also ask

Is angular 2 still supported?

Angular versions v2 to v11 are no longer under support.

How many versions are there in angular?

Angular is a blanket term that is used for all the versions which came after AngularJS (Angular 1), i.e., Angular 2, Angular 4, Angular 5 and now Angular 6. It has the latest and most refined framework till date to design a web application that is dynamic and responsive.

How do I find angular version?

Checking the Angular VersionOpen the Terminal + view in your project and type ng version . For recent versions of Angular, this will list the versions of several Angular packages that you have installed in your project.

What is the most stable version of angular?

Finally, Angular 14, the latest version of the Google-developed, TypeScript-based web application framework, made its way on 2nd June 2022, with the prior success of Angular 13. With the consideration of all the release notes before, Angular 14 is one of the most systematic pre-planned upgrades of Angular.


1 Answers

All angular modules except router have the same version number, router usually has the same minor and patch version, i.e. angular 2.0.1 => router 3.0.1.

In general, you can find corresponding versions in node_modules/@angular/[core|router|...]/package.json

@angular/core 2.4.1:

"peerDependencies": { "rxjs": "^5.0.1", "zone.js": "^0.7.2" }

@angular/router 3.4.1:

"peerDependencies": { "@angular/core": "2.4.1", "@angular/common": "2.4.1", "@angular/platform-browser": "2.4.1", "rxjs": "^5.0.1" }

like image 196
kemsky Avatar answered Oct 20 '22 15:10

kemsky