Install Angular

Last Updated on May 15, 2022
Install Angular

Install Angular

To install Angular there are some prerequisites that must be installed on your computer. We need to install the NPM (Node Package Manager) to install the libraries, and packages and execute the scripts. Let's check does it has already been installed or not. To make sure that we can take the following steps.

  • Install the Node: open the command window and type node -v. If it displays the version of Node, then that means you have already installed the Node.
    C:\>node -v
    v16.15.0

    If not, then follow the link https://nodejs.org to download and install the available release. Follow the same link to update the older version to the new latest version of Node.
  • If we need to update the version, then run the following command to the command window.
    npm install -g npm

    On MAC use the below command on the terminal.
    use sudo npm install -g npm
  • Install the NPM: follow the same above steps but instead of node-v type npm -v. To update or install run the following command.
    use sudo npm install -g npm

After installing both Node.Js and NMP, it's time to install the Angular CLI.

npm install -g @angular/cli@latest

This is what looks like after Angular is successfully installed.

C:\>npm install -g @angular/cli@latest

added 196 packages, and audited 197 packages in 24s

24 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities
npm notice
npm notice New minor version of npm available! 8.5.5 -> 8.10.0
npm notice Changelog: https://github.com/npm/cli/releases/tag/v8.10.0
npm notice Run npm install -g npm@8.10.0 to update!
npm notice

To check the version of the installed Angular. Run the following command in the command window.

ng --version
     _                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/


Angular CLI: 13.3.5
Node: 16.15.0
Package Manager: npm 8.5.5
OS: win32 x64

Angular:
...

Package                      Version
------------------------------------------------------
@angular-devkit/architect    0.1303.5 (cli-only)
@angular-devkit/core         13.3.5 (cli-only)
@angular-devkit/schematics   13.3.5 (cli-only)
@schematics/angular          13.3.5 (cli-only)