Home Interview Questions & Answers

Angular Interview Questions and Answers (2026)

By Jacob Gates 7 min read

Angular interview questions in 2026 assume Angular 17 or newer: standalone components, signals, and the @if/@for control flow are standard answers, while NgModule-era explanations date a candidate.

I spent ten years as a corporate interviewer before coaching candidates, and Angular screens follow a pattern. A small set of questions separates people who have shipped an app from people who memorized a list. Each entry says what the interviewer is checking, gives an answer you can say out loud, and names the mistake that sinks candidates.

The Angular interview questions that match each level

Question depth tracks the grade, not the job title. A junior screen stays on components and binding, while a senior loop pushes into change detection, performance, and architecture. Rehearse the row that matches the role, then skim the level above.

LevelWhat they assumeRehearse
Junior (0-2 years)You can build a component and wire a formFundamentals, lifecycle, data binding
Mid (3-5 years)You own a feature end to endRxJS, routing, reactive forms, OnPush
Senior (6+ years)You shape architecture and debug productionSignals, lazy loading, performance, SSR edge cases

Angular fundamentals

These five come up in almost every screen. I open most interviews with the first one. The definitions are easy; the follow-up is where candidates separate. The general versions sit in most common interview questions and answers.

What is Angular, and how is it different from AngularJS?

What the interviewer is checking: whether you know the architecture, not just the name.

Angular is a TypeScript framework built around components, dependency injection, and RxJS. AngularJS 1.x is a different framework with controllers and scopes. There’s no automatic upgrade path; moving between them is a rewrite. Calling Angular “AngularJS” costs credibility.

What’s the difference between a component and an NgModule?

What the interviewer is checking: whether you’ve worked in modern Angular.

A component is a class with a template and styles. An NgModule was the compilation and dependency-injection boundary before standalone components. Since Angular 19, components are standalone by default, so imports sit in the component’s own array. NgModules still appear in older codebases. Angular’s component guide covers the current form.

What are the types of data binding?

What the interviewer is checking: whether you can wire a template without looking it up.

Interpolation, property binding, event binding, and two-way binding through [(ngModel)], which is sugar over a property and an event. In a reactive form, ngModel won’t work; use formControlName.

What are directives, and what changed with built-in control flow?

What the interviewer is checking: whether your knowledge is current.

Components are directives with templates. Attribute directives change behavior, and structural directives change the DOM. Since Angular 17, @if, @for, and @switch replace most *ngIf and *ngFor work, and @for needs a track expression. Calling *ngIf the only option dates your last project.

Walk me through the lifecycle hooks.

What the interviewer is checking: whether you know where code belongs.

The order runs ngOnChanges, ngOnInit, ngDoCheck, ngAfterContentInit, ngAfterContentChecked, ngAfterViewInit, ngAfterViewChecked, then ngOnDestroy. Setup goes in ngOnInit, input reactions in ngOnChanges, DOM work in ngAfterViewInit, teardown in ngOnDestroy. An HTTP call in the constructor is the classic mistake, since inputs aren’t set yet.

Change detection and RxJS

This is where mid-level candidates separate. The questions sound theoretical and are really about debugging a slow or stale view.

How does change detection work?

What the interviewer is checking: whether you understand why an app gets slow.

Angular checks components from the root down after asynchronous work. zone.js patches timers, promises, and DOM events to trigger a tick, and the default strategy checks every component on that pass. OnPush checks only on input reference changes, events inside the component, async pipe emissions, or signal reads.

What does OnPush actually skip?

What the interviewer is checking: whether you can use OnPush without breaking the view.

OnPush skips a component and its children until a trigger fires. Mutating an array in place doesn’t register because the reference never changed; replace it, use a signal, or call markForCheck(). detectChanges() runs immediately for that view, so sprinkling it hides a data-flow bug instead of fixing it.

Observable vs Promise?

What the interviewer is checking: whether you pick the right async primitive.

A promise is eager, resolves once, and can’t be cancelled. An observable is lazy, can emit many values, and is cancellable through unsubscribe(). Angular’s HttpClient returns a cold observable, so subscribing twice fires two requests.

switchMap vs mergeMap: when do you use each?

What the interviewer is checking: whether you’ve debugged a race condition.

switchMap cancels the previous inner observable, which a typeahead needs. mergeMap runs them in parallel for independent writes, concatMap queues them in order, and exhaustMap ignores new values while one runs, which fits a login button. Using mergeMap for a typeahead fires every request at once. Answers can then arrive out of order.

How do you prevent subscription leaks?

What the interviewer is checking: whether you’ve shipped a long-lived page.

Prefer the async pipe, which unsubscribes with the view. In class code, use takeUntilDestroyed() or unsubscribe in ngOnDestroy. With destroyRef = inject(DestroyRef) in the component, a search box looks like this:

this.query.valueChanges.pipe(
  debounceTime(300),
  distinctUntilChanged(),
  switchMap(term => this.api.search(term)),
  takeUntilDestroyed(this.destroyRef)
).subscribe(results => this.results = results);

“Angular unsubscribes automatically” is only true for the async pipe and for observables that complete, such as a single HTTP response. A Subject in a service never completes on its own.

Two developers discussing a design on a whiteboard during technical interview practice

Component communication

How do parent and child components talk?

What the interviewer is checking: the daily mechanics you’ll use on day one.

Inputs go down, outputs go up. The modern form is input() and output() signal functions, with model() for a two-way binding, and a child should emit changes instead of mutating an object the parent owns.

How do unrelated components share state?

What the interviewer is checking: whether you reach for a store too early.

A shared service with a BehaviorSubject or a signal covers most cases, and the service decides who owns the write. Reach for NgRx or a signal store when several routes share state, actions need an audit trail, or effects coordinate side effects. A modal and its button don’t need a store.

Routing, forms and state

How does lazy loading work?

What the interviewer is checking: whether you can keep the first bundle small.

loadChildren loads a routes file, and loadComponent loads a single standalone component. Both are dynamic imports that produce a separate chunk, which PreloadAllModules or a custom strategy can fetch after first paint. Importing a lazy feature’s component into the shell defeats the split.

What kinds of route guards are there?

What the interviewer is checking: whether auth sits in the right layer.

Functional guards such as CanActivateFn return a boolean, a UrlTree, or an observable of either. canDeactivate protects unsaved forms, and resolve preloads data before activation. A guard is a UX check, not a security boundary; the server validates every request, and an interceptor attaches the token.

Template-driven or reactive forms?

What the interviewer is checking: whether you know which one scales.

Template-driven forms use ngModel and suit two or three fields. Reactive forms build the model in the class, are typed since Angular 14, and handle validation, testing, and dynamic fields better. Mixing ngModel with formControlName in one form is the mistake you’ll want to avoid.

Debugging and scenario questions

How do you fix ExpressionChangedAfterItHasBeenCheckedError?

What the interviewer is checking: whether you understand dev-mode verification.

The error means a binding changed after Angular checked it, usually because a child or setter wrote parent state during change detection. Derive the value in ngOnInit, pass it down as an input, or use OnPush with markForCheck(). Wrapping the write in setTimeout silences the check and leaves the bug.

The app feels slow. How do you diagnose it?

What the interviewer is checking: whether you measure before changing code.

I start with a profile in Chrome DevTools and Angular DevTools, then check change-detection cycles, bundle size, long lists, and images. The fixes follow the measurement: OnPush on stable branches, a track expression in @for, @defer around heavy components, lazy routes, and NgOptimizedImage. Adding OnPush everywhere is not a diagnosis.

It works locally and fails in production. Why?

What the interviewer is checking: whether you’ve shipped an Angular build.

AOT and optimization expose problems the dev server doesn’t show: direct DOM access during server rendering, window or document at module scope, environment file differences, and case-sensitive imports on Linux. Read the build output and the source-mapped stack trace before blaming the server.

Behavioral follow-ups on technical answers

Most technical questions turn into a story question. “You mentioned OnPush. Tell me about a time it broke a view.” Answer with the symptom, how you measured it, the change you made, and what the measurement showed afterward.

Prepare two stories: one performance fix and one bug that reached production. Name the tool you used and the trade-off you accepted. They’re listening for ownership, not heroics. I ask for the story behind an answer, not the definition. For the general version, see behavioral interview questions and answers, and when they invite questions, pick two from questions to ask at the end of an interview.

Angular interview questions FAQ

Do I need to know AngularJS?

No for a modern Angular role, but know that it’s a separate framework with a different architecture. Some enterprises still maintain AngularJS apps, and “I’d rewrite it” without asking about the migration plan sounds naive.

How much RxJS do I need?

Know observables versus promises, the four flattening operators, and cleanup. map, filter, tap, catchError, debounceTime, and distinctUntilChanged cover most daily work.