What You Need
| Tool | Notes |
|---|---|
| Node.js (LTS) | Runs the build tools. Download from nodejs.org. Check the Angular docs for the supported Node versions |
| npm | Comes with Node.js |
| Code editor | VS Code with the Angular Language Service extension |
| Browser | Chrome with Angular DevTools extension (helpful later) |
Step 1: Check Node.js
Step 2: Install the Angular CLI
ng is the Angular command line tool. It creates projects, generates code, runs a development server, runs tests and builds for production.
Step 3: Create a Project
The CLI asks a few questions. Good beginner answers:
| Question | Choose |
|---|---|
| Stylesheet format | CSS (simplest) or SCSS |
| Server-side rendering (SSR) | No for now. We learn it later |
| AI tools / extras | Skip |
Step 4: Run It
The browser opens http://localhost:4200. The page reloads automatically when you save a file.
Common CLI Commands
| Command | Does |
|---|---|
ng new name | Create a project |
ng serve | Development server with live reload |
ng generate component name (ng g c name) | Create a component |
ng g service name | Create a service |
ng g directive name / ng g pipe name | Create a directive or pipe |
ng build | Production build into dist/ |
ng test | Run unit tests |
ng update | Upgrade Angular |
ng add @angular/material | Add a library with setup |
Your First Change
Open src/app/app.html and replace its content:
Save. The browser updates at once.
Common Problems
| Problem | Fix |
|---|---|
ng is not recognized | Close and reopen the terminal. Check the npm global folder is in PATH |
| Permission error on install (macOS/Linux) | Use a Node version manager such as nvm instead of sudo |
| Port 4200 busy | ng serve --port 4300 |
| Wrong Node version message | Install the Node LTS version that the Angular docs support |
ng generate creates files in the right place with the right names, so you do not make typing mistakes.
Conclusion
Install Node.js and the Angular CLI, create a project with ng new, run it with ng serve and edit files while the browser reloads automatically.

