development setup

Angular Series Part 2 - Setup Dev Environment

December 31, 2022

VinoPravin

Angular Series Part 2 - Setup Dev Environment

Post last updated: December 31, 2022

Set up the development environment

What is a Angular Dev setup?

image alt text Setting up the development environment for Angular involves installing and configuring the necessary tools and libraries on your computer. Here we’ll follow a step-by-step guide on how to set up the development environment for Angular.

Install Node.js

image alt text

Angular requires Node.js to be installed on your computer. Node.js is a JavaScript runtime that allows you to run JavaScript code on your server. You can download and install the latest version of Node.js from the official website.

Install the Angular CLI

image alt text

The Angular CLI (Command Line Interface) is a tool that allows you to create, build, and deploy Angular applications. To install the Angular CLI, open a terminal window and run the following command:

terminal
npm install -g @angular/cli

Create a new Angular project

image alt text

  • Once the Angular CLI is installed, you can use it to create a new Angular project. To do this, run the following command
terminal
ng new my-project
  • Replace "my-project" with the desired name of your project. This command will create a new directory with the same name as your project and generate the necessary files and dependencies for your Angular app.

Run the Angular app locally

image alt text

  • To run the Angular app locally, navigate to the project directory and run the following command
terminal
ng serve
  • This will start a development server and open the Angular app in your default web browser. You can now make changes to the code and see the updates in real-time.

By default it will serve in port 4200, you can open the browser and type http://localhost:4200 to see your app up and running.

Hurray! You have Created your First Angular app! ✨

Author

VinoPravin

A Professional Full Stack Web Developer based in India. I help some of the fastest growing startups launch and grow their products.