-
Notifications
You must be signed in to change notification settings - Fork 0
Installing Angular
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.
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.
-
Follow the link - https://nodejs.org/en/
-
Download the node.js installer for Windows and install it.
-
Select Next on the initial Node.js Setup Wizard screen.
- Accept the License Agreement and click Next.
- Define the destination folder for the installation and select Next.
- 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.
- 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.
- Click Install to start the installation process.
- Once the installation is complete, select Finish to exit the Setup Wizard.
- 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.
- To verify the NPM version, use the following command:
npm -v
The output shows you have installed NPM version 8.11.0.
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.
- Access the Windows Command Prompt and install TypeScript with the following command:
npm install -g typescript
- Once the installation is complete, verify the TypeScript version:
tsc -v
In this example, the TypeScript version is 4.7.3.
- 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.
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.
- Accept the License Agreement and click Next
- Click Install to start the installation process.
- To verify the NVM version, use the following command:
nvm -v
nvm install 16
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.
- Access the Windows Command Prompt and enter the following command:
npm install -g @angular/cli
ng version
- Access your project’s root folder from the Windows Command Prompt and enter the following command:
npm run start
- Use any browser to access your Angular local development server on localhost:4200: