Follow-up · depth 6
Design a small subsystem that relies on Built-in Control Flow @if @for @switch
Design a small subsystem that relies on Built-in Control Flow @if @for @switch
Answers use simple, clear English.
Quick interview answer
Sketch components, data flow, failure modes, and metrics around Built-in Control Flow @if @for @switch. Example shape: @for (item of items(); track item.id) { <li>{{ item.name }}</li> }
Detailed answer
Mini design using Built-in Control Flow @if @for @switch: • Components: API edge, worker/queue, store, and observability. • Data flow: request → Built-in Control Flow @if @for @switch-related path → response/async side effects. • Failure modes: timeouts, overload, partial dependency loss. • Metrics: latency, errors, saturation for the Built-in Control Flow @if @for @switch path. Guardrails: Always track by identity; prefer new syntax in Angular 17+. Parent context: At Tech Lead depth: start with the problem, then mechanism, then a short example. New template syntax replaces *ngIf/*ngFor for many cases: @if, @for (with track), @switch.
Full explanation
Interviewers want a crisp architecture story anchored on Built-in Control Flow @if @for @switch, not a buzzword list. New template syntax replaces *ngIf/*ngFor for many cases: @if, @for (with track), @switch. Better type narrowing and performance guidance via mandatory track.
Follow-up questions
Only answered follow-ups are shown — click to open with full answers
Parent context — Built-in Control Flow @if @for @switch
At Tech Lead depth: start with the problem, then mechanism, then a short example. New template syntax replaces *ngIf/*ngFor for many cases: @if, @for (with track), @switch.
View full parent question →