This tutorial will guide you on how to set up an Angular development environment on your local machine. This environment setup will allow you to develop and run your Angular application locally without the need for Internet. Additionally, you will be able to store your progress without losing any essential data.
Steps to Setup Environment for Angular
There are only two steps required to set up an Angular development environment on your local machine −
-
Installation of Node.js and npm
-
Installation of Angular CLI
Node.js and npm Installation
Node.js is a JavaScript runtime environment that provides a platform to execute JavaScript code outside of a browser. It is also a central repository from where one can download JavaScript packages using npm. The npm stands for Node Package Manager. These tools come bundled together when you install Node.js on your machine.
To install Node.js and npm for Angular development, follow the steps given below −
Step 1:
Head over to the Node.js official website by following this link. From here, download the LTS (Long Term Support) version of NodeJS installer.
Step 2:
After downloading, navigate to the folder where NodeJS is located and double click the installer. When you double click, the following window will pop up −
Here, click on Next button.
Step 3:
Accept the end-user license agreement and click Next button to move further.
Step 4:
In this step, choose the location where you want to install NodeJS on your machine. Click the Change button to choose custom location or simply click on the Next button to leave default location. We suggest leaving the default location as it is.
Step 5:
Next, you will be asked to select the features for NodeJS you want to install. Keep the default features selected and click the Next button.
Step 6:
Now, click on the checkbox to install the tools necessary to compile native modules. Then, click Next.
Step 7:
Finally, clicking on the install button will start installation process.
Open the command prompt to verify if node is installed or not. We can check it using the below command −
node --version