Home › Blog › Angular interview questions

Angular interview questions

Angular interviews concentrate on two things that cause most real Angular bugs: when change detection runs, and what happens to observables you forgot to unsubscribe from.

Change detection

RxJS, where the bugs live

If a subscription has no teardown, it is a leak. Interviewers ask about this precisely because it is the most common defect in real Angular codebases.

DI, modules and forms

The practical round

Expect to build or fix a small component - a filtered list with a debounced search, or a form with validation - and to explain performance choices as you go. `trackBy` in a list is the detail interviewers look for, because without it Angular tears down and rebuilds every row when the collection changes. Be ready to say how you would profile a slow component too: the Angular DevTools profiler shows which components are being checked and how often, which turns a guess about change detection into a measurement. The framework-agnostic half is in frontend interview questions and TypeScript interview questions.

How deep it goes by level

Whatever the level, say your answers out loud rather than reading them. Most of what candidates lose in a Angular interview is lost between knowing something and explaining it under observation - the method is in how to use AI for interview prep.

Where CoPilot Interview fits

Disclosure: we build an interview assistant, so treat this as a disclosed pitch. CoPilot Interview is a native Windows and macOS app that puts suggested answers on your own screen in about two seconds, across coding, system design and behavioral rounds, with a permanent free tier that needs no credit card.

Frequently asked questions

What are the most common Angular interview questions?

What triggers change detection and how `OnPush` changes it, unsubscribing from observables, the difference between `switchMap` and `mergeMap`, hierarchical dependency injection, and reactive versus template-driven forms.

How do you avoid memory leaks in Angular?

Give every manual subscription a teardown - `takeUntil` with a destroy subject, `takeUntilDestroyed`, or preferably the async pipe, which unsubscribes automatically when the component is destroyed. Unterminated subscriptions are the most common defect in real Angular code.

What is the difference between switchMap and mergeMap?

`switchMap` cancels the previous inner observable when a new value arrives, which suits a typeahead where stale responses are useless. `mergeMap` runs them concurrently and keeps all results, which suits independent operations where every result matters.

What does OnPush change detection require?

That inputs change by reference rather than being mutated in place. Under `OnPush`, Angular only re-checks a component when an input reference changes, an event fires within it, or it is explicitly marked - so mutating an array without replacing it leaves the view stale.

Walk into the round with a second pair of eyes

CoPilot Interview is a native Windows and macOS app that puts suggested answers on your own screen in about two seconds, across coding, system design and behavioral rounds. The free tier is permanent: 15 minutes a day, no credit card.

Try it free