What mid-level and senior Angular interviews ask about signals, OnPush, zoneless change detection, DI, routing and SSR, with strong answers.
Angular interview questions for 5 years experience test judgment more than vocabulary. Expect to explain how change detection works in your app, when you reach for signals versus RxJS, how dependency injection scopes a service, how you lazy load and secure routes, and how you would find and fix a slow page. The biggest risk is sounding out of date. Until v22, Angular shipped a major version every six months, so five years can span about ten majors, and several defaults have flipped: components are standalone, new apps are zoneless, and OnPush is now the default change detection strategy. The 14 questions below show what a strong answer sounds like today.
What the loop usually looks like
With five years behind you, you are usually interviewed as mid-level or senior. Loops vary by company, so ask the recruiter which of these you will get:
- Framework conversation. Change detection, reactivity, DI, routing. Most of the questions below live here.
- Live coding or a take-home. Usually a small component or feature: a filtered list, a form, a data fetch with loading and error states.
- Front-end design. How you would structure a large app, share state, split bundles and handle auth.
- Behavioral. Decisions you made, disagreements, mentoring, a migration you led.
Answers that date you
If most of your experience is on NgModule-era Angular, check your answers against this table first. Legacy knowledge still helps on teams mid-migration, as long as you show you know what you would move to.
- If you say — Say this instead — Why
- "Every component is declared in a module." — Components are standalone by default and import what they use. — In versions before 19.0.0, standalone defaulted to false.
- "Zone.js triggers change detection." — New apps are zoneless. Signals, template listeners, markForCheck and the async pipe notify Angular. — Zoneless is the default in v21 and later.
- "Default change detection, and OnPush where it's slow." — OnPush is the default. — The docs list OnPush as the default strategy since v22.
- "@Input() and @Output()." — input(), output() and model(). — The Angular team recommends the function-based APIs for new projects; the decorators remain supported.
- "Karma and Jasmine." — Vitest. — New CLI projects include Vitest and jsdom; Karma is still supported.
- "Class-based guards and interceptors." — Functional guards (CanActivateFn) and functional interceptors. — The docs recommend functional interceptors for more predictable behavior.
One more date worth knowing: Angular v20's long-term support ends on 28 November 2026. If the team is on v20 or older, expect an upgrade question.
Change detection and reactivity
1. How does change detection work in your current app, and what does OnPush change?
What they're testing: whether you understand why the DOM updates, not just that it does.
Strong answer: With the default (eager) strategy, Angular checks a component whenever activity may have happened anywhere in the app. With OnPush, it checks a component only when an input changes through a template binding, an event listener in the component runs, or the component is marked for check, which the async pipe and signals read in the template do for you. Then say which one your app uses. A common OnPush bug is mutating an array in place: the input reference never changes, so the view doesn't update.
Likely follow-up: "What does zoneless add?" Without Zone.js, Angular stops guessing from browser events. It runs change detection when something tells it to: a signal read in a template is updated, a bound listener fires, markForCheck is called, or ComponentRef.setInput is used. Code that updated plain fields inside a setTimeout and relied on Zone.js to notice has to use a signal or call markForCheck instead.
2. Signals or RxJS: how do you decide?
What they're testing: that you don't treat it as a team sport.
Strong answer: Signals hold a current value and suit component and UI state: something is always readable, and computed derives from it. Observables model events over time: debounced search input, websockets, cancellation, retry. Most apps use both, and the interop handles the boundary. toSignal turns an observable into a signal, unsubscribes when the component or service is destroyed, and takes an initialValue for the moment before the first emission. toObservable goes the other way.
3. When is effect() the wrong tool?
What they're testing: whether you have hit the common signals mistake.
Strong answer: When you use it to keep one signal in sync with another. That is a derivation, so use computed, which is lazy, memoized and recalculates only when a dependency changes. Effects are for side effects on things outside the signal graph, such as logging, a third-party chart or localStorage. Two details show experience: signals read after an await inside an effect are not tracked, and untracked stops a read from becoming a dependency.
4. What is resource() and when would you use it?
Strong answer: It brings async data into signal-based code. A params computation reruns when its signals change, and the loader runs each time params produce a new value. The loader receives an abortSignal, so an outdated request is aborted when params change mid-load. Its status is a signal too: idle, loading, reloading, resolved, error or local, which maps cleanly onto loading and error states in the template. httpResource does the same through HttpClient, so interceptors still apply.
Components and templates
5. How do components communicate?
Strong answer: Parent to child with input() (or input.required(), which fails the build if a template omits it), child to parent with output(), and two-way with model(), which is mainly for form-control-like components. For components that aren't related, use a shared service holding signals or observables. If you are passing an input through three layers that don't use it, it belongs in a service.
6. Why does @for need track, and what do you track by?
What they're testing: list rendering performance.
Strong answer: track links each item to its DOM nodes, so Angular updates only what changed instead of rebuilding rows. Track by a unique, stable ID. $index is fine for static lists that never change. Tracking by the object itself is a last resort, because the docs warn it makes updates slower.
7. What does @defer do?
Strong answer: It splits part of a template into a separate JavaScript chunk that loads on a trigger: on idle by default, or viewport, interaction, hover, immediate, timer or a when condition. @placeholder, @loading and @error cover the states, and prefetch on idle can load the code early. The catch: only standalone components, directives and pipes are deferred, and a dependency also used outside the block in the same file stays eager.
Dependency injection
8. What happens when you provide a service in a component's providers?
What they're testing: hierarchical injectors.
Strong answer: Angular has two hierarchies. The environment injector holds app-wide services; element injectors belong to components and directives. Resolution walks up the element injectors first, then the environment injectors, and the first provider found wins. A service in a component's providers gets one instance per component instance, which is what you want for per-form state, such as two editors open side by side. Mention the inject() options optional, self, skipSelf and host.
Likely follow-up: "What is @Service()?" In the current docs it is a shorthand for @Injectable({ providedIn: 'root' }) that works with inject() but not constructor injection. Use @Injectable when you need constructor injection or a non-root scope.
Routing, HTTP and security
9. How do you lazy load a feature?
Strong answer: loadComponent for a single component, loadChildren for a route tree. Both take a loader that returns the import() promise, and a default export means no .then. The trade-off: smaller initial bundle, but each lazy route adds a request later, which nested lazy loading can make noticeable.
10. Walk me through authentication in an Angular app.
What they're testing: whether you know where security actually lives.
Strong answer: An interceptor attaches the token, a guard handles the user experience, and the server enforces access.
export const authInterceptor: HttpInterceptorFn = (req, next) => {
const token = inject(AuthService).token();
return next(token ? req.clone({ setHeaders: { Authorization: `Bearer ${token}` } }) : req);
};
export const authGuard: CanActivateFn = () =>
inject(AuthService).isLoggedIn() || inject(Router).createUrlTree(['/login']);Most of a request is immutable, hence clone. Return a UrlTree from the guard rather than returning false and navigating yourself, which the docs advise against. Then the key line: Angular's docs say never to rely on client-side guards as the only access control, because browser code can be modified.
11. How does Angular protect against XSS?
Strong answer: It treats every bound value as untrusted and handles it by context (HTML, style, URL and resource URL); resource URLs cannot be sanitized at all. bypassSecurityTrust* methods on DomSanitizer turn that off, so they should be rare and reviewed. Direct DOM APIs get no protection, so prefer templates. Bonus: HttpClient sends an X-XSRF-TOKEN header from the XSRF-TOKEN cookie on mutating same-origin requests, but only if the backend sets and checks it.
Performance and SSR
12. A list page is slow. How do you fix it?
This is the most useful question to rehearse, because it pulls in everything above. A strong answer goes in order:
- Measure first. Profile before changing anything, and say which tool you would use.
- Check what re-renders. Is the component OnPush? Is the list tracked by a stable ID?
- Move work out of the template. A method call in a template reruns on every check. A computed caches until its inputs change:
@Component({
selector: 'app-order-list',
imports: [OrderRow],
template: `
<input #box (input)="query.set(box.value)" placeholder="Filter by customer" />
@for (order of visible(); track order.id) {
<app-order-row [order]="order" />
} @empty {
<p>No orders match.</p>
}
`,
})
export class OrderList {
orders = input.required<Order[]>();
query = signal('');
visible = computed(() => {
const q = this.query().toLowerCase();
return this.orders().filter((o) => o.customer.toLowerCase().includes(q));
});
}- Ship less code. Lazy load the route and @defer heavy widgets below the fold.
- Then the data. Paginate or virtualize if the list itself is too long.
A weak answer lists techniques without saying how you'd know which one is needed.
13. What is hydration, and what breaks it?
Strong answer: After server-side rendering, hydration reuses the server's DOM instead of rebuilding it, which avoids flicker and helps LCP and CLS. It is enabled with provideClientHydration(). It needs the same DOM structure on server and client, so the usual culprits are direct DOM manipulation (innerHTML, native DOM APIs) and invalid HTML such as a <div> inside a <p>. ngSkipHydration is a last-resort escape hatch. Event replay captures clicks made before hydration finishes.
Testing
14. How do you test Angular code?
Strong answer: New CLI projects use Vitest with jsdom; many existing ones still run Karma, which is supported. Unit test services and pure logic directly, test components through their rendered output rather than private fields, and keep a few end-to-end tests for critical flows. Say what you would not test, too: at five years, judgment about cost matters more than a coverage number.
A one-week preparation plan
- Day 1: Read the job ad and find the Angular version in the posting or the company's public repos. Check your answers against the table above.
- Days 2–3: Build the order list above from scratch with ng new, using signals, @for, a lazy route, a functional guard and an interceptor.
- Day 4: Rehearse question 12 out loud until you can give the five steps in two minutes.
- Day 5: Prepare two project stories in STAR form: a performance fix and a migration or architecture decision. Our STAR interview questions guide covers the format, and the technical round questions cover the general round.
- Days 6–7: Prepare questions for them, such as "Which Angular version are you on, and what is blocking the next upgrade?" The answer tells you what your first six months look like.
If you practise with Verve AI's Interview Copilot, upload your resume and the job description and add your project stories to the Knowledge Base, so its suggestions draw on your own Angular work rather than generic answers.
Sources
- Supported versions, v22 release date (2026-06-03), v20 LTS end (2026-11-28), 12-month cycle from v22 and 6-month cycle before: https://angular.dev/reference/releases
- Eager vs OnPush checking rules, OnPush default since v22: https://angular.dev/guide/components/advanced-configuration
- Zoneless default in v21+, what notifies change detection: https://angular.dev/guide/zoneless
- Standalone by default, standalone defaulted to false before 19.0.0: https://angular.dev/guide/components
- Signals, computed (lazy, memoized), effects, untracked, reads after await: https://angular.dev/guide/signals
- toSignal, initialValue, auto-unsubscribe, toObservable: https://angular.dev/ecosystem/rxjs-interop
- resource(), params, loader, abortSignal, status values, httpResource: https://angular.dev/guide/signals/resource
- input(), input.required build-time check, model(), recommendation for new projects: https://angular.dev/guide/components/inputs
- output() recommendation for new projects: https://angular.dev/guide/components/outputs
- @for and track guidance: https://angular.dev/guide/templates/control-flow
- @defer triggers, sub-blocks, prefetch, standalone requirement: https://angular.dev/guide/templates/defer
- Hierarchical injectors, resolution order, component-level instances, resolution modifiers: https://angular.dev/guide/di/hierarchical-dependency-injection
- @Service() vs @Injectable: https://angular.dev/guide/di/creating-and-using-services
- loadComponent, loadChildren, default exports, trade-offs: https://angular.dev/guide/routing/loading-strategies
- Functional guards, UrlTree return, never rely on client-side guards alone: https://angular.dev/guide/routing/route-guards
- Functional interceptors recommended, immutable requests and clone: https://angular.dev/guide/http/interceptors
- Sanitization contexts, bypassSecurityTrust, direct DOM, XSRF: https://angular.dev/best-practices/security
- Hydration, provideClientHydration, mismatch causes, ngSkipHydration, event replay: https://angular.dev/guide/hydration
- Vitest and jsdom default, Karma still supported: https://angular.dev/guide/testing
- Verve Knowledge Base: https://docs.vervecopilot.com/features/knowledge-base
Ryan
CEO of Verve AI






