Decoded Frontend - Angular Interview Hacking %21%21top%21%21
Settable values that notify consumers when they change.
: When not to use it (this distinguishes senior developers from juniors). 2. High-Frequency Technical Pillars
Answer: The constructor is for DI and basic initialization; ngOnInit is for component initialization logic (API calls, data binding) when inputs are available.
You can control how Angular searches for a dependency using resolution modifiers: Decoded Frontend - Angular Interview Hacking %21%21TOP%21%21
Go through the 13 concepts in order: change detection / OnPush; observable cancellation and RxJS operators; DI hierarchies; lazy loading; router guards; reactive forms; NgZone ; trackBy and pure pipes; build targets; state patterns; testing; security; performance profiling. For each one, write a small code example from memory.
Every interviewer will push deeper. Be prepared for:
If you mention NgModule first, you already lost. Settable values that notify consumers when they change
"OnPush checks only when input references change, events fire, or observables emit — drastically boosting performance."
Be prepared to explain when to use Angular Signals (for synchronous state and fine-grained reactivity) versus RxJS Observables (for complex event streams and asynchronous data).
@Directive( selector: '[appTwice]' ) export class TwiceDirective implements OnChanges { @Input() appTwice: any; Every interviewer will push deeper
Signals are Angular's new reactive primitive, stable since v17 and improved through v19–20. Key differentiators:
"The biggest hack is using provideHttpClient(withInterceptors()) interceptors as functions instead of class-based interceptors, reducing bundle size by ~15%."
You will be given scenarios asking you to choose between operators. Make sure you understand the difference between higher-order mapping operators like switchMap , mergeMap , and concatMap . Interviewers will test your ability to use operators like debounceTime for search inputs and how to clean up subscriptions to prevent memory leaks. 🛡️ Phase 4: Custom Directives, Interceptors, and Forms
They are simple functions that return an observable, promise, or boolean, bypassing class boilerplate.
: