Quick recap
All 56 questions, one line each
Filter to one category, collapse what you already know, and print the rest. Click any question to open the full explanation.
The syntax card
| Binding | Syntax | Direction |
|---|---|---|
| Interpolation | {{ value }} | class → view (text only) |
| Property | [prop]="value" | class → view |
| Event | (click)="fn()" | view → class |
| Two-way | [(ngModel)]="value" | both — it's [x] + (xChange) |
| Lifecycle, in order | Use for |
|---|---|
constructor | Injection only — inputs are NOT set yet |
ngOnChanges | Runs BEFORE ngOnInit, and again on every input change |
ngOnInit | Load data, subscribe — runs ONCE |
ngAfterViewInit | @ViewChild, DOM, chart libraries |
ngOnDestroy | Unsubscribe, clear timers |
| Pipe | Example |
|---|---|
date | {{ d | date:'dd/MM/yyyy' }} |
currency | {{ n | currency:'INR' }} |
uppercase / lowercase | {{ s | uppercase }} |
json | {{ obj | json }} — debugging |
async | {{ data$ | async }} — subscribes AND unsubscribes |
| RxJS operator | Does |
|---|---|
map / filter / tap | Transform · drop · side effect |
switchMap | Chain, cancelling the previous — search, route params |
mergeMap / concatMap / exhaustMap | All at once · in order · ignore while busy |
debounceTime + distinctUntilChanged | Typeahead |
forkJoin | Promise.all for observables |
takeUntil | Unsubscribe on destroy |
shareReplay(1) | Share one execution — stops duplicate HTTP calls |
The 12 things to be sure of
If you remember nothing else, remember these.
| 1 | Angular is a framework, React is a library — DI, routing, HTTP and RxJS come in the box. |
| 2 | Constructor = injection only. Inputs aren't set yet — initialise in ngOnInit. |
| 3 | ngOnChanges fires before ngOnInit, and again on every input change. ngOnInit runs once. |
| 4 | *ngIf removes the element from the DOM — it isn't hidden, it's destroyed. |
| 5 | trackBy is React's key. Without it a reassigned array rebuilds every row. |
| 6 | providedIn: 'root' = one instance app-wide. Listing it in a component's providers quietly breaks that. |
| 7 | Reactive forms for anything real. Template-driven only for a login box. |
| 8 | Route params: subscribe to paramMap, don't read the snapshot — the component is reused. |
| 9 | An interceptor is the one place for the auth token and global error handling. Requests are immutable — req.clone(). |
| 10 | Observables are lazy and cancellable. Nothing happens until you subscribe, and two subscribes = two HTTP calls. |
| 11 | switchMap cancels the previous — right for search. mergeMap doesn't — wrong for search. |
| 12 | OnPush needs immutable data. Push to an array and nothing renders; replace the array and it does. |
Words that signal seniority
change detection · OnPush · immutable data ·
cold observable · lazy loading · tree-shakeable ·
provider scope · memory leak · debounce ·
cancel the previous request · feature module ·
measure first · trade-off
How to answer, whatever they ask
What it is → why it matters → what you'd do in practice, then tie it to something you've actually built. If you don't know, say so and say how you'd find out.