Supertu | Tu agencia de redes sociales

Decoded Frontend Angular Interview Hacking

When they ask “Tell me about a bug you fixed in Angular”, don’t say “typo”. Say:

“We had a performance drop in a dashboard with 500+ components. I profiled with Angular DevTools, found change detection was running on every mousemove due to a parent component with Default strategy. I refactored child components to OnPush, used markForCheck only when data actually changed, and added trackBy. Rendering time dropped from 400ms to 12ms.”

Common live-coding question:

“Search as you type, cancel previous request, avoid race conditions.”

Solution:

search$ = this.searchTerm$.pipe(
  debounceTime(300),
  distinctUntilChanged(),
  switchMap(term => this.api.search(term))
);

👉 Hack: Also mention takeUntil(destroyed$) for unsubscribe safety — it’s a green flag.

The Trap: Thinking ngOnChanges is the only way to detect updates. decoded frontend angular interview hacking

The Hack: Prove you understand how Angular renders the DOM. This is where you separate Junior/Mid from Senior.