Step-by-Step Guide to Installing Angular on Your Computer
- Install Node.js: Angular requires Node.js to be installed on your system. You can download the installer from the official Node.js website (https://nodejs.org/en/) and run it to install Node.js.
-
Install the Angular CLI: Once Node.js is installed, you can use the Node.js command prompt to install the Angular CLI (Command Line Interface) by running the following command:
npm install -g @angular/cli
-
Create a new Angular project: Use the Angular CLI to create a new project by running the command
ng new project-name
. This will create a new directory with the specified project name and initialize it with a basic Angular application. -
Navigate to the project directory: Use the command
cd project-name
to navigate to the newly created project directory. -
Start the development server: Use the command
ng serve
to start the development server. This will compile and serve the application, and it will be available athttp://localhost:4200/
-
Test the application: Open a web browser and navigate to
http://localhost:4200/
to see the default application running.