Follow-up · depth 9
How do you make Built-in Control Flow @if @for @switch safer under partial failure?
How do you make Built-in Control Flow @if @for @switch safer under partial failure?
Answers use simple, clear English.
Quick interview answer
Harden Built-in Control Flow @if @for @switch with timeouts, retries with jitter, isolation, and graceful degradation. 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.
Detailed answer
Resilience for Built-in Control Flow @if @for @switch under partial failure: • Timeouts + budgets on every dependency call • Retries only when idempotent, with jitter/backoff • Isolation: bulkheads/queues so one failure does not cascade • Degradation: serve stale/cached/limited mode when needed Practices: 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
Partial failure is the default in distributed systems — show how Built-in Control Flow @if @for @switch stays useful anyway. 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 →