Many of them now days want to learn AngularJS 2 but most of them don’t know how to install Typescript Packages, so here i will explain you how to install Typescript and that will be useful to use AngularJS 2 .
Step 1: First thing is we need to download the node JS
Download LTS version and install : compare to other version LTS is better .
Step 2: After installation of node js, check the node version by typing the below command
Step 3: After installing node js , even it automatically installs npm(node packet manger), so just check the version of the npm by using below command
Step 4: If you want to check the latest version of npm or you want to update the version then type the below command
npm -g update
Step 5: Installation of typescript:
To install typescript run the below command in cmd .
npm install -g typescript
The -g flag is use for installing typescript globally
Step 6: To check the version of typescript use the below command
Step 7: To install Angular CLI
npm install -g @angular/cli
Step 8: To check the version use the below command
This completes the installation of Typescript in Windows 10. To use and check the program whether working fine or no just follow the below instructions
Step 9: To create new project in typescript type the below command
ng new second
second is the name of the project, it takes few minutes to create project
Step 10 : Now Write program using IDE and save program (Extension of programs for typescript will be always .ts)
Step 11: Just save the program and run it using the below command
Step 12 : Go to browser and run the program by typing
This completes the installation and working on typescript.
You can follow the below video for installation