Web
Analytics
migrating from angular 2 to angular 4 | Angular | ASP.NET Tutorials

For Consultation : +91 9887575540

Stay Connected :

migrating from angular 2 to angular 4

How to upgrade angular 2 project into angular 4

upgrade to angular 4 from 2

we will learn how we can create our first Angular 4 application or Installation of angular 4 or upgrade existing angular 2 application to angular 4 application.

Step 1: First Varify that NPM(Node JS) and Angular CLI is installed in your PC.

Step 2: Create new angular project by writing following command (Please reach destination folder location using  cd command in command prompt)

              ng new [project name]

Ex: ng new second

Creation of Angular 4 application using angular cli

Creation of Angular 4 application using angular cli

Step 3: go inside second project, using cd <project_name>.





Step 4: Type

              ng -v

 

Angular JS version details

Angular 4 project version

Step 5: Write following command in command prompt

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

Step 6: Write ng-v

Angular 4 Project

Your project is migrated into angular 4 successfully.

Step 7: Write

ng serve –open

This will open your angular 4 application in the browser.