Getting started with Angular

Estimated study time: 10 minutes. From zero to a running Angular app in a few commands.

Getting your first Angular project running takes just a few steps, thanks to the Angular CLI.

Step 1: Install Node.js

Angular requires Node.js and npm. Download the LTS version from the official Node.js website and confirm the install:

node -v
npm -v

Step 2: Install the Angular CLI

npm install -g @angular/cli

Step 3: Create a New Project

ng new my-first-app
cd my-first-app

The CLI will ask about routing and stylesheet format — choose based on your project's needs (routing: yes, for most real apps).

Step 4: Run the Development Server

ng serve --open

This compiles the app and opens it in your browser at http://localhost:4200, with live reload on every save.

Understanding the Project Structure

  • src/app/ — your components, services, and modules live here.
  • src/index.html — the single HTML page the whole app mounts into.
  • angular.json — build and project configuration.
  • package.json — dependencies and npm scripts.

Generating Your First Component

ng generate component hello
# or the shorthand
ng g c hello
💡 Tip: Use ng generate for components, services, and modules instead of creating files by hand — it wires up imports and boilerplate correctly every time.

Ready to go beyond the basics?

Get hands-on training, live mentorship, and placement support with Uncodemy's Angular Training Course.

Explore Angular Training Course →