Angular 12 Tutorial - Installation

How to Install Angular 12 on Windows

Follow the easy steps here to install Angular on Windows.

Step 1: To begin, download and install Node.js. 

The Node Package Manager (NPM) and its features provide a building environment for the angular bases required for the application to run. To install Node.js, follow these steps:

  • Go to the Node.js official website downloads page. Now, Select the “Windows Installer” package to download the most recent Node.js

INstall Angular 12 in windows

 

A Node.js setup wizard will appear on your screen, prompting you to click the “next” button. Next, click the button

Nodjs setup

 

Select the licensing agreement checkbox and then click "next."

Nodjs setup

Navigate to the target folder on your computer and press the “next” button

 

Nodjs setup

At this point, walk through the available features to install, but make sure you've included the "npm package manager" in the installation bundle before clicking "next."

 

Nodjs setup

Check the checkbox below to allow automated installation of all required tools, and then click "next."

 

Nodjs setup

 

Select “install.”

 

Nodjs setup

 

When the installation procedure is finished, click "Finish" to dismiss the setup wizard.

 

Nodjs setup

 

  • Open a command prompt on Windows and run node -v to determine the Node.js version that is installed.

 

Nodjs setup

 

Now, use the command “npm –v” to check your NPM version

 

Nodjs setup

 

Step 2: Install Typescript- although not a prerequisite, this step is crucial in making JavaScript easier to comprehend and manage. This phase consists of the following two steps:

  • Open Windows Command Prompt and run the command “npm install –g typescript” to install Typescript

  • Once the installation is complete, type the command tsc –v to verify the TypeScript version installed

 

Nodjs setup

 

Step 3:  Install the Angular Command-line Interface (CLI)

CLI is a must-have tool for creating, developing, and managing Angular applications. We will go through how to install CLI using the NPM Package in the following easy stages.

Open a command prompt in Windows and type "npm install –g @angular/cli." The system will ask whether you want to share your usage data with the angular team as the command runs. Because it does not affect the functionality, you can select either "Yes" or "No."

 

Nodjs setup

 

After installing packages, run the command "ng –version" to validate the installed version

Nodjs setup

 

 

2. How to Install on macOS

We will learn how to install Angular on your macOS system using the Homebrew Package manager Index. Homebrew is a package management program for macOS computers that enables the rapid installation of new packages on Mac computers through the brew command-line utility. The installation process is easy; just follow the following steps:

Step 1: Install the Node.js Package

First, you need to install the Node.js package on your computer.  To install, run the command below on the terminal

 

$ brew update
$ brew install node

 

Step 2: Install the CLI tool.

Once you have installed the Node.js and npm on your macOS computer, run the commands below to install the Angular CLI tool

$ npm install -g @angular/cli

 

The command line above will install the newest available Angular CLI version on your computer

 

 

How to Create an Angular Application on macOS

First of all, open your Homebrew and run the command “$ng new name of your project” to create a new application. The following message will be displayed on your screen

 

Nodjs setup

 

Your  angular application is ready  to serve; run your  ng serve command  to run your application on the localhost  port 4200

Nodjs setup

You have successfully created your first angular project

 

Conclusion: You have now successfully installed Node.js, the NPM, and the angular command-line interface on your machine. The following chapter will teach you how to construct a new Angular Application