Now that Angular is following a Semantic Versioning, and Angular2.4.3 were released, I\'m a little confused here on what is the best practice when I upgrade to the next Angular
I suggest you install npm-check-updates library. This will let you find the latest version of dependencies, which you use.
Follow the steps:
To install
npm i -g npm-check-updates
To update your package.json:
npm-check-updates -u
To install latest versions your dependencies
npm install
I've upgraded my app from Angular 2.4.0
to 4.0.2
without any code changes! Bare in mind, though that it depends of which features/classes/methods you are using.
I ran
npm i @angular/common@latest @angular/compiler@latest @angular/core@latest @angular/forms@latest @angular/http@latest @angular/platform-browser@latest @angular/platform-browser-dynamic@latest @angular/platform-server@latest @angular/router@latest typescript@latest --S -E
then
npm i @angular/compiler-cli@latest --D -E
NOTE: use @latest
if you want the latest stable version. Use @next
if you want the latest 'bleeding edge' version.
For Windows You can use the below command
npm install @angular/common@latest @angular/compiler@latest @angular/compiler-cli@latest @angular/core@latest @angular/forms@latest @angular/http@latest @angular/platform-browser@latest @angular/platform-browser-dynamic@latest @angular/platform-server@latest @angular/router@latest @angular/animations@latest typescript@latest --save