Install Node.js: Angular requires Node.js to be installed on your computer. You can download and install the latest version of Node.js from the official website here.
Install the Angular CLI: After you have installed Node.js, you can use the Node Package Manager (npm) to install the Angular CLI by running the following command in your terminal:
npm install -g @angular/cli
Create a new project: Once you have the Angular CLI installed, you can use it to create a new project by running the following command:
ng new project-name
Navigate to the project: Once the project has been created, navigate to the project directory by running the following command:
cd project-name
Serve the application: Finally, you can use the following command to start the development server and run the application locally:
ng serve
This will run the application locally and it will be accessible in a browser, by default, the development server runs on localhost:4200
.
It's important to note that these steps are a general overview of the process and may vary depending on your specific environment and setup. The Angular CLI provides many useful commands to develop, test and deploy an Angular application. You can check the documentation here for more information and guidance.
0 Comments