67 Angular interview questions with answers
67 Angular interview questions with detailed answers, sorted from basic to advanced. Free to practice, with progress saved automatically.
All Angular interview questions
What is Angular? How is it different from AngularJS, React and Vue?
What parts make up an Angular component?
What is a standalone component and why does Angular recommend it?
How does modern Angular application bootstrapping work?
What role do NgModules still play in modern Angular?
What is the Angular lifecycle hook order and when should each hook be used?
How do the Angular compiler and template type checking help production apps?
How do interpolation, property binding and event binding differ?
How does two-way binding with `[(ngModel)]` work?
What are component inputs and outputs used for in Angular?
How is signal input `input()` different from traditional `@Input()`?
When should you use model input `model()`?
What is a directive in Angular? How do structural directives differ from attribute directives?
How do new control flow blocks `@if`, `@for`, `@switch` differ from `*ngIf`, `*ngFor`?
Why is `track` important in `@for`?
What is the `@defer` block used for?
When should you use content projection with `ng-content`?
What is a signal in Angular?
How do `signal`, `computed` and `effect` differ?
How are view queries different from content queries?
In Angular, how do you bring async (HTTP) data into signal-based code? How does `toSignal()` differ from `resource()`?
How do Observables and Signals differ in Angular?
How does OnPush change detection work?
What is zoneless Angular and when should you consider it?
How does the `async` pipe help when using Observables in templates?
How are pure pipes different from impure pipes?
What is Dependency Injection in Angular?
How is `providedIn: "root"` different from a component provider?
How is `inject()` different from constructor injection?
When should you use `InjectionToken`?
How do hierarchical injectors affect state and memory leaks?
How do provider strategies `useClass`, `useValue`, `useFactory`, and `useExisting` differ?
What are the basics of Angular Router?
How do you lazy load routes in modern Angular?
Do route guards truly secure APIs?
When should you use a resolver in Angular Router?
How does `withComponentInputBinding()` help with route params?
How do you read route params and query params in Angular?
What problem do typed Reactive Forms solve?
How do you write a custom validator in Reactive Forms?
When should you use ControlValueAccessor?
When should you use FormArray?
How do Reactive Forms and Template-driven Forms differ in Angular? When do you use each?
What is HttpClient used for in Angular?
When should you use an HTTP interceptor?
How do `switchMap`, `mergeMap`, `concatMap`, and `exhaustMap` differ in Angular?
How do you avoid memory leaks when subscribing to Observables?
Where should HTTP errors be handled in Angular?
What problems do Angular SSR and hydration solve?
What is hydration in Angular SSR? How does non-destructive hydration work?
What are common hydration mismatch issues in Angular?
Where should you start when optimizing an Angular bundle?
How does Angular support accessibility (a11y)? What does the CDK a11y module provide?
How are `animate.enter` and `animate.leave` different from legacy Angular animations?
What is Angular TestBed used for?
Does modern Angular CLI testing use Karma or Vitest?
How do you test HttpClient in Angular?
When does an Angular app need NgRx, Signal Store or another state management library?
What is a safe process for migrating a legacy Angular app to a newer version?
Should initialization code go in the `constructor` or `ngOnInit`? Why?
With a signal holding an array/object, why does `items().push(x)` not update the UI? How do `set` and `update` differ?
What causes `ExpressionChangedAfterItHasBeenCheckedError` (NG0100) and how do you fix it?
A component uses `OnPush` but the UI does not update when data changes — how do you diagnose and fix it?
How do you use `takeUntilDestroyed` correctly, and why does it sometimes throw NG0203?
Migrating an Angular app to zoneless: what breaks and what must be fixed?
When should you **not** use `effect()`? What do you use instead?
Design a refresh-token flow with an HTTP interceptor: how do you keep concurrent 401s from triggering multiple refresh calls?