Prerequisite for Angular
In this tutorial,i am going to use Typescript.It is easy to learn, if you know c# or java already
Before start writing programs in Angular2,make sure that you have following environment ready.
- INSTALL VISUAL STUDIO CODE
- INSTALL NODEJS
- INSTALL TYPESCRIPT
- INSTALL ANGULAR CLI
NPM(Nodejs Package Manager) is used to download all packages related to angular framework.
VISUAL STUDIO CODE:Code editor to edit the code
It provides necessary commands to CREATE,COMPILE,EXECUTE,TEST and DEPLOY angular applications.
- Ng new(CREATE)
- Ng build (COMPILE)
- Ng serve (RUN)
- Ng test(TEST)
- Ng g (GENERATE)
Let us see, how to install nodejs first
Go to 'https://nodejs.org/en/download/' and download LTS version of nodejs.
Now run the nodejs installer.After installation complete, make sure that it is installed correctly.
Go to command prompt and type 'C:\\users\\user1> node –v'
It will show the installed version of nodejs in your system.
npm:The node package manager comes along with nodejs itself.
To check the installed version of npm:
Give the command as 'C:\\users\\user1>npm –v'
To install typescript package
Go to command prompt and type
'C:\\users\\user1>' npm install typescript g
‘g’ means globally u can use this typescript package globally in any folder.
How to install angular cli?
Go to command prompt and type npm install @angular/cli