This article will show you how to install Angular on Windows and create a local environment for developing web applications. By end of the article, you will understand how to :
- Install Node/npm on your machine.
- Use and install Angular CLI globally.
- Running the first Hello World application
- Uninstall angular cli
In order to continue, you must have :
- Windows Machine
- Good Internet Connectivity
- Windows user account with all/admin installation privileges where you can install any packages freely.
Read About: Download & Install Drivers for any Laptop or PCs
Install Node/npm on your machine:
Angular requires the latest/stable version of Node.js in order to continue.
- Go to the official website in order to install Node.js on your machine locally.
- You can install any version, the current one or latest stable version, as per your need. Just click on the button and it will start downloading the package on your machine.
- Once downloaded click on the icons downloaded and follow the steps, till the installation is completed. To check the version installed of Node.js you can use the following command in a terminal/console window.
node — — version
- Note: Once you have installed Node.js it will automatically install NPM on your machine, and you can check the version installed using the below command.
Install Angular CLI globally:
The Angular command-line interface (CLI) tool allows you to initialize, develop, and manage your Angular applications. You can use the NPM package manager to install the Angular CLI.
npm install -g @angular/cli
Once installation is done please verify weather angular installed or not in your local:
Running the first Hello World application
- Create angular application using ng new command as shown below.
ng new hello-world
- Once project is created change into project directory and run application using ng serve command as shown below.
ng serve -o
Congrats!! You have setup an angular project
Uninstall angular cli
There are cases when you need to uninstall Angular-CLI from your operating system, you can simply do so by running this below command on terminal:
npm uninstall -g @angular/cli