In this tutorial, we will learn how to set up Angular Development Environment and create a sample Angular project.
Steps
- We have to install the latest version of Node.js. Node is a runtime environment for executing JavaScript code outside the browser. Node provides tools which we need for building Angular projects.
For installing Node, visit https://nodejs.org and download the latest version. An MSI installer package will be downloaded, install it.
You can check the version of Node by using the following command in command prompt :
node --version
- After installing node, we can install Angular CLI.
npm install –g @angular/cli
You can check the version by using below command.
ng -- version
- Download and install Visual Studio Code. Visit https://code.visualstudio.com
- Create a new project.
ng new First-Project
- Sometimes, you will encounter with an error in project creation.
"npm install fails in windows using fsevents (error code 4048)."
Generally, it happens with the latest version of npm. You need to revert to an older version.
Use the below command for this.
npm install -g [email protected]
After reverting to the old version, try creating the project again.