Interview
Angular Cheatsheet
A quick reference guide for Angular CLI commands, signals syntax, RxJS lifecycle streams, routing guards, and testing templates.
Last Updated: July 15, 2026
•
10 min read
1. Learning Objectives
This cheatsheet serves as a quick reference guide. By reviewing these tables, you can quickly find:
- Common Angular CLI scaffolding commands.
- Signals syntax for reads, writes, updates, and computed values.
- Common RxJS operators and subscription hooks.
- Functional route guard setup structures.
- Component test templates using TestBed.
2. Overview
This cheatsheet lists common CLI commands, signals methods, RxJS operations, and template binding syntax guides.
3. Angular CLI Scaffolding
| CLI Command | Description |
|---|---|
| ng new <name> | Creates a new Angular workspace. |
| ng generate component <name> | Creates a new standalone component. |
| ng generate service <name> | Creates a new injectable service. |
| ng serve | Launches local dev server on port 4200. |
4. Angular Signals API Cheat Sheet
| Syntax | Description |
|---|---|
| mySig = signal(initialValue) | Declares a new writable signal. |
| mySig() | Reads the signal value reactively. |
| mySig.set(newValue) | Sets the signal value directly. |
| mySig.update(val => next) | Updates the signal value using an updater function. |
| comp = computed(() => sig() * 2) | Creates a read-only computed signal. |
| effect(() => console.log(sig())) | Runs side-effects on signal updates. |
5. Common RxJS Operators Cheat Sheet
| RxJS Operator | Primary Streaming Purpose |
|---|---|
| map() | Transforms emitted values. |
| filter() | Filters values based on a condition. |
| debounceTime(ms) | Discards values that occur within a specified time window. |
| switchMap() | Cancels active inner subscription when a new value is emitted. |