How to install Angular, Angular CLI and setup project

By Ved Prakash N | Aug 04, 2022 | Angular
Share : Whatsapp

https://www.fundaofwebit.com/post/how-to-install-angular-cli-project-setup

How to install and use the Angular CLI


In this post, you will be learning how to install the Angular CLIBefore installing the Angular CLI, you'll need to install Node.js.

If you're using a Windows or Mac download it here. And for the amazing Linux guys, here's the best way to install Node.js.

When you install the NodeJs, NPM (Node Package Manager) is also installed.


Now, lets check the Node is installed or not by check the version with the following command:

node -v

Note: Angular requires Node.js version 10.9.0 or greater. 


Step 1: Installing Angular CLI (Globally) using the npm package manager with the following command:

npm install -g @angular/cli


Step 2: If you have already angular cli installed, then you can update to latest version with the following command:

npm update -g @angular/cli


Step 3: Create an Angular project / application with the CLI with following command:

ng new my-first-project

once project is created successfully, change the path as follows:

cd my-first-project


Step 4: Start the Angular application with the CLI as follows:

ng serve

OR

ng serve --open


Open a terminal or command prompt and run this command to see the basic options and available commands for the Angular CLI.

ng help


That's all, your project is ready.

Thanks for reading.