migrating from angular 2 to angular 4
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
Step 3: go inside second project, using cd <project_name>.
Step 4: Type
ng -v
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
Your project is migrated into angular 4 successfully.
Step 7: Write
ng serve –open
This will open your angular 4 application in the browser.