Skip to content

Installing Angular

OliaStfn edited this page Jun 12, 2022 · 5 revisions

Angular is one of the most popular JavaScript libraries to build Web applications. First of all you will need is to install Angular on your machine.

Install NodeJS

Angular bases its build environments on Node.js, and many of its features depend on NPM packages. Conveniently, the Node Package Manager (NPM) client is part of the default Node.js package.

  1. Follow the link - https://nodejs.org/en/

  2. Download the node.js installer for Windows and install it.

  3. Select Next on the initial Node.js Setup Wizard screen.

image

  1. Accept the License Agreement and click Next.

image

  1. Define the destination folder for the installation and select Next.

image

  1. You can customize how to install available features. Make sure that the npm package manager is part of the installation bundle. Click Next to proceed.

image

  1. Check the box if you would like to install tools for compiling native modules automatically. They are not mandatory and require an additional 3 GB of space. Select Next to continue.

image

  1. Click Install to start the installation process.

image

  1. Once the installation is complete, select Finish to exit the Setup Wizard.

image

  1. Access the Windows Command Prompt (or PowerShell) and check the Node.js version:

node -v

The system confirms that Node.js v16.15.1 is installed.

Screenshot_13

  1. To verify the NPM version, use the following command:

npm -v

The output shows you have installed NPM version 8.11.0.

Screenshot_14

Install TypeScript

TypeScript makes JavaScript easier to maintain and understand. You can install TypeScript as an NPM package. The installation is optional, as it is not a prerequisite for developing an Angular application.

  1. Access the Windows Command Prompt and install TypeScript with the following command:

npm install -g typescript

Screenshot_15

  1. Once the installation is complete, verify the TypeScript version:

tsc -v

In this example, the TypeScript version is 4.7.3.

image

Install NVM

  1. In order to install Node Version Manager tool in Windows environment we need to download .exe file.

https://github.com/coreybutler/nvm-windows/releases And download the nvm-setup.zip file of the latest version.

image

Extract the downloaded archive file from your system.

You will get a node-setup.exe file under the archive file. Double click the node-setup.exe file to begin the Node installation on Windows.

Follow the installation wizard to complete the installation of Node on Windows.

  1. Accept the License Agreement and click Next

Screenshot_1

Screenshot_2

Screenshot_3

  1. Click Install to start the installation process.

Screenshot_4

  1. To verify the NVM version, use the following command:

nvm -v

Screenshot_5

nvm install 16

Screenshot_6

Install Angular CLI

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.

  1. Access the Windows Command Prompt and enter the following command:

npm install -g @angular/cli ng version

Screenshot_8

  1. Access your project’s root folder from the Windows Command Prompt and enter the following command:

npm run start

Screenshot_9

  1. Use any browser to access your Angular local development server on localhost:4200:

http://localhost:4200/

photo_2022-06-08_14-48-18

Clone this wiki locally