Angular7 - Environment Setup



In this chapter, we will discuss the Environment Setup required for Angular 7. To install Angular 7, we require the following −

  • Nodejs
  • Npm
  • Angular CLI
  • IDE for writing your code

Nodejs

To check if nodejs is installed on your system, type node -v in the terminal. This will help you see the version of nodejs currently installed on your system.

Nodejs has to be greater than 8.x or 10.x, and npm has to be greater than 5.6 or 6.4.

C:\>node 
–v v10.15.1

If it does not print anything, install nodejs on your system. To install nodejs, go to the homepage, https://nodejs.org/en/download/of nodejs and install the package based on your OS.

The homepage of nodejs is as follows −

Nodejs

Based on your OS, install the required package. Once nodejs is installed, npm will also get installed along with it. To check if npm is installed or not, type npm –v in the terminal as given below. It will display the version of the npm.

C:\>npm 
–v 6.4.1

Angular 7 installations are very simple with the help of angular CLI. Visit the homepage https://cli.angular.io/ of angular to get the reference of the command.

 CLI Angular

Type npm install –g @angular/cli in your command prompt, to install angular cli on your system. It will take a while to install and once done you can check the version using below command −

ng version

It will display version details of angular - cli as well version of others packages as shown below −

Version CLI

We are done with the installation of Angular 7. You can use any IDE of your choice, i.e., WebStorm, Atom, Visual Studio Code to start working with Angular 7.

The details of the project setup are explained in the next chapter.

Advertisements