Interview prep · Angular 2026

Land the role, without cramming in the dark.

The 53 questions I was actually asked in Angular interviews, worded the way they were asked, with clear, up-to-date answers (zoneless, signals, control flow). Expand, revise, repeat.

53questions
7themes
FR · ENbilingual
Angular 22up to date 2026

I bombed two senior Angular interviews on the theory part, even though I'd been shipping to production for years. “As a senior, you're expected to answer these questions easily.” So I kept every question I was asked, without making a single one up. Here are the answers I wish I'd had.

Sara, founder of NgDigest
53 questions

JS/TS fundamentals

6
The language of the web: it runs in the browser, and on the server with Node.js. It is dynamically typed (a variable's type is only checked at runtime) and single-threaded: one thing at a time, but it handles async work through the event loop (callbacks, promises, async/await). It's multi-paradigm: you can write object-oriented or functional code. Modern engines don't interpret it "line by line": they compile it on the fly (JIT). For an Angular interview, add that TypeScript is a superset of JavaScript that adds types checked at compile time, then disappears: the browser always runs JavaScript.
Yes, but not like Java or C#. JavaScript is object-oriented through prototypes: an object can inherit directly from another object, without a class. The class keyword, added in 2015, is a more readable syntax on top of that same mechanism. Functions are also values like any other, so a lot of JavaScript is written in a functional style (map, filter, pure functions). The reassuring answer: "yes, but prototype-based, and we often mix object-oriented and functional code".
A template for creating objects that share the same shape: properties (data), methods (behaviour) and a constructor called on creation. TypeScript adds types and modifiers (private, readonly). In Angular, almost everything is a class: a component, a service, a directive, a pipe. What makes them "Angular" is the decorator on top (@Component, @Injectable…), which tells the framework how to use them.
A concrete object created from a class with new. If the class is the mould, the instance is the cake: each instance has its own values, but they share the same methods. The Angular point that makes the difference: you never write new MyService() yourself. Dependency injection creates instances and decides how many exist (a single one for the whole app with providedIn: 'root', one per component if you provide it in a component).
A class implements an interface when it provides the concrete code for a contract: the interface says what (the signatures), the class says how. An example everyone knows: export class MyComponent implements OnInit forces you to write ngOnInit(). TypeScript checks the contract at compile time. The detail that shows you understand it: interfaces disappear at runtime. That's why you can't inject an interface directly in Angular; you use an InjectionToken or an abstract class.
The Document Object Model: the tree representation of the HTML page that the browser builds, and the API to read and change it (querySelector, appendChild…). In Angular, you almost never touch it by hand: you describe the UI in the template, and Angular updates the real DOM when state changes. Watch out for a common mix-up: Angular does not use a virtual DOM like React, it compiles templates into instructions that update the DOM directly. If you really need the DOM (focus, a third-party library), do it after rendering (afterNextRender), and remember there is no document during server-side rendering.

Angular Core

19
A TypeScript class decorated with @Component, which manages a piece of the UI. It has three parts: the selector (the tag that inserts it, app-user-card), the template (the HTML) and the styles. The class holds state and reacts to user actions; it receives data through its inputs and notifies its parent through its outputs. An Angular app is a tree of components.
Modern 20262026: components are standalone by default (no NgModule needed), and inputs and outputs are written with input() and output() rather than @Input() and @Output().
The smart (or container) component knows where data comes from: it injects services or the store, triggers calls and decides what to do with user actions. The dumb (or presentational) component only displays what it receives as inputs and emits events; it injects no business service. Benefit: display components are reusable and easy to test, and logic lives in one place. Example: a "product list" page (smart) that passes each product to an app-product-card (dumb). Don't be dogmatic: a small self-contained component doing both is sometimes perfectly fine.
Modern 20262026: with input() and output(), and OnPush by default since Angular 22, display components are even simpler to write.
Yes, they form a tree: each component can render others in its template. To communicate: parent to child with inputs (input()), child to parent with outputs (output()), and both ways with model() (two-way binding). Between components that aren't parent and child (two "siblings", two pages), you go through a shared service or a store. There's also content projection (<ng-content>), where the parent slots its own HTML into the child, and viewChild() for a parent to reach a child. The good reflex to mention: switch to a service as soon as you find yourself passing data up three levels.
What they want is a concrete list and the reason for each item. Structure: one folder per feature, a core/ for app-wide singletons (interceptors, guards), a shared/ for reusable pieces, lazily loaded routes. Quality: TypeScript strict mode, ESLint and Prettier, written conventions (naming, BEM or another CSS rule, commit format). State: services with signals to start with, a store only if the need shows up. Tests and CI from day one, even light. Depending on the project: i18n, centralised HTTP error handling, environments. End with what you put in writing: a README with these rules, so the fifth person who joins codes like the first.
Modern 20262026: a new project is standalone, zoneless and uses Vitest by default (Angular 21).
I organise by feature, not by file type. Concretely: core/ (singleton services, interceptors, guards), shared/ (reusable components, pipes and directives), then features/<feature>/ holding everything about it. On a bigger project, each feature can be split into layers (domain, application, infrastructure, presentation). Why: you find code where you expect it, a feature lazy-loads with its route, and you can delete or hand over a feature without digging through the whole project. The counter-example to mention: a components/ folder with 80 flat files.
The most common ones: by type (components/, services/, models/: simple at first, unmanageable later), by feature (the most widespread in Angular), layered inside each feature (inspired by Clean Architecture and DDD), and monorepo with Nx, where the app is split into libraries with rules about who can import what. For a UI component library you also see Atomic Design (atoms, molecules, organisms). Above all, show that you choose based on team and project size, not fashion.
A class decorated with @Injectable that holds what doesn't belong in a component: HTTP calls, reusable business logic, state shared across several screens. The component asks for the service (dependency injection) instead of creating it. The result: the component stays focused on display, and the service can be tested on its own.
Modern 20262026: you inject it with inject(UserService) rather than through the constructor, and it often exposes its state as signals.
The service is registered in the root injector: a single instance for the whole application, available everywhere without declaring it anywhere else. Bonus: it's tree-shakable, so if it's never injected, it isn't in the bundle. The other options: provide it in a route's providers (one instance for that part of the app) or in a component's (one instance per component, useful for state local to a form, for example). providedIn: 'any' still exists but has been deprecated since Angular 15.
A simple principle: a class doesn't create what it needs itself, it is given it from outside. In Angular, you declare what you need and the framework hands you the instance. What it brings: in tests you easily swap the real service for a fake; the component doesn't depend on how the service is built; and one instance can be shared. Angular has hierarchical injectors (root, route, component): it looks closest first, then goes up. To inject a value or an interface, you use an InjectionToken.
Modern 20262026: the inject() function has replaced constructor injection in most projects.
A design pattern that guarantees a class has only one instance, shared by everyone who uses it. In Angular, that's every providedIn: 'root' service: an AuthService or a shopping cart shared by the whole app. The classic trap: if you add that service to a component's providers, that component gets its own instance, and the state is no longer shared. It's a bug that takes a long time to find.
The four classics: interpolation {{ value }} to display text, property binding [src]="url" (class to template), event binding (click)="save()" (template to class) and two-way binding [(ngModel)], which is just shorthand for [ngModel] + (ngModelChange). The "others" interviewers usually expect: [attr.aria-label] (an HTML attribute with no DOM property), [class.active] and [style.width.px].
Modern 20262026: for your own components, model() lets you offer a [(value)] without writing the input and output by hand.
In HTML, disabled is a boolean attribute: its mere presence disables the button. So <button disabled="false"> is… disabled. In Angular, you bind the property: [disabled]="isSaving", and the button is enabled or disabled based on the value. Second trap, with reactive forms: don't put [disabled] on a field bound to a FormControl (Angular warns you in the console). You disable the control itself with control.disable(), or when you create it.
Historically: *ngIf with else and as (to keep the result, for example user$ | async as user), *ngFor with index, first, last, even, odd, count and above all trackBy to avoid re-rendering everything, and [ngSwitch].
Modern 20262026: since Angular 17 we use the built-in control flow: @if / @else, @for with a mandatory track and the $index, $first, $last, $even, $odd, $count variables, an @empty block for empty lists, and @switch. *ngIf and *ngFor have been deprecated since Angular 20, and ng update can migrate the code.
[ngClass] accepts an object ({ 'card--active': isActive, 'card--error': hasError }, the most common form), an array or a string. For a single conditional class, [class.card--active]="isActive" is more readable. Avoid calling a method in the binding ([ngClass]="getClasses()"): it runs again on every change detection; prefer a computed value.
Modern 20262026: the Angular style guide now recommends [class] and [style] bindings over NgClass and NgStyle, and an automatic migration exists.
A class that adds behaviour to an existing element, without a template of its own. Two families: attribute directives, which change appearance or behaviour (ngClass, or a home-made appAutofocus, appTooltip), and structural directives, which add or remove elements from the DOM (the old *ngIf). A component is actually a directive with a template. To write one: @Directive({ selector: '[appAutofocus]' }), then act on the host element.
Modern 20262026: host listeners and bindings are declared in the decorator's host property rather than with @HostListener and @HostBinding.
A pipe transforms a value for display, right in the template: {{ price | currency:'EUR' }}. Built-in ones to mention: date, currency, number, percent, uppercase, lowercase, titlecase, slice, keyvalue, json (for debugging) and above all async, which subscribes to an Observable and unsubscribes on its own. To create one: a @Pipe({ name: 'truncate' }) class with a transform() method. By default a pipe is pure: it only recomputes when its input changes (by reference), which makes it very cheap. An impure pipe recomputes on every cycle: avoid it. A detail interviewers like: to get French formats (1 234,56 €), you need to register the fr locale.
You declare an array of routes: each path maps to a component ({ path: 'users/:id', component: UserDetail }), and you provide it with provideRouter(routes). When the URL changes, the router displays the right component in the <router-outlet>, without reloading the page. You navigate with routerLink in templates or router.navigate() in code. Around that: URL parameters, guards (canActivate, canMatch) to protect a route, resolvers to load data before display, and lazy loading.
Modern 20262026: with withComponentInputBinding(), route parameters arrive directly in the component's input()s.
The slot where the router displays the active route's component. Your layout (header, menu, footer) stays in place, and only what's inside the <router-outlet> changes as you navigate. They can be nested: a parent route with child routes displays the children in its own <router-outlet>. There are also named outlets, to show a second route side by side (a side panel, for example).
The idea: load the code for a part of the app only when the user goes there. With loadComponent: () => import('./admin/admin').then((m) => m.Admin) (or loadChildren for a whole group of routes), the build creates a separate JavaScript file. The initial bundle is smaller, so the first page displays faster. You can then preload routes in the background once the page is shown (withPreloading(PreloadAllModules)).
Modern 20262026: @defer applies the same idea to a piece of a template (a chart at the bottom of the page, loaded when it becomes visible).

RxJS & Signals

6
A stream of values over time. It can emit zero, one or many values, then finish (complete) or fail (error). It's lazy: until someone subscribes (subscribe), nothing happens. The expected comparison: a Promise gives a single value, starts right away and can't be cancelled; an Observable can give several values, starts on subscription and is cancelled by unsubscribing. The concrete trap: an HttpClient call is a "cold" Observable, so two | async on the same Observable fire two requests.
A special Observable you can also push values into yourself (next()), and which broadcasts them to all its subscribers at once. The variants to know: Subject (no initial value, a new subscriber only gets later values), BehaviorSubject (has an initial value and immediately gives the latest value to a new subscriber: ideal for state), ReplaySubject (replays the last N values) and AsyncSubject (only gives the last value, at the end). Good practice: keep the Subject private in the service and expose only asObservable(), so nobody else can emit.
They're everywhere in Angular's historical APIs. HttpClient returns Observables. The router exposes paramMap and its events as Observables. Reactive forms have valueChanges. The old @Output() relies on EventEmitter, which is a Subject. In templates, you read them with the async pipe, which subscribes and unsubscribes on its own. The example that shows you can use them: a search with valueChanges.pipe(debounceTime(300), distinctUntilChanged(), switchMap((term) => this.api.search(term))).
Modern 20262026: for displayed state, we often convert an Observable to a signal with toSignal(); RxJS remains the right tool for event streams.
The classic pattern: a private BehaviorSubject holding the state, a public read-only Observable (asObservable()), and methods that change it by creating a new value (this.items$.next([...this.items$.value, item])) rather than mutating the old one. Components read with | async and never get access to next(). ReplaySubject(1) is for when there's no sensible initial value.
Modern 20262026: the same pattern is simpler with a private signal(), exposed with asReadonly(), and computed() for derived values (item count, total).
Don't recite an endless list: group them by use, with one case each. Transform: map, filter, tap (side effect, debugging). Chain calls: switchMap (cancels the previous call: search), concatMap (in order: successive saves), mergeMap (in parallel), exhaustMap (ignores clicks while a call is running: a "pay" button). User input: debounceTime, distinctUntilChanged. Combine: combineLatest (several filters), forkJoin (wait for several calls). Errors: catchError, retry. Share: shareReplay. Stop: take, takeUntilDestroyed.
Yes, and that's what they want to hear: as few manual subscribe() calls as possible. In the template, the async pipe subscribes and unsubscribes on its own. In the class, takeUntilDestroyed() ends the subscription when the component is destroyed. toSignal() does the same and turns the stream into a signal. The old way, still very common in existing code: a destroy$ = new Subject<void>(), takeUntil(this.destroy$) and a next() in ngOnDestroy. A useful detail: an HttpClient call completes on its own, but unsubscribing still cancels the request if the user leaves the page before the response.

Architecture & State

10
Answer from your experience, then show you know how to choose. The options: a service holding state (signals or BehaviorSubject) is enough for most apps. NgRx Store (actions, reducers, selectors, effects) is justified when many screens share complex state and you want to trace every change (debugging tools, history). NgRx SignalStore is a lighter middle ground built on signals. What looks bad: bringing in NgRx for a three-page app. What looks good: explaining the criterion that made you choose, and what it cost (extra code, training the team).
The client sends a request: a method (GET, POST, PUT, PATCH, DELETE), a URL identifying the resource (/api/users/42), headers (Content-Type, Authorization) and sometimes a JSON body. The server answers with a status code (200 OK, 201 created, 400 bad request, 401 not authenticated, 404 not found, 500 server error) and usually JSON. In REST, each request stands on its own: the server keeps no session between calls. In Angular: HttpClient (provideHttpClient()), typed responses, and interceptors to add the token or handle errors in one place.
Modern 20262026: for a read that depends on a signal (a filter, an id), httpResource() re-runs the request on its own and is stable since Angular 22.
Application Programming Interface: a contract that says how one program can use another (which requests to make, in what form, and what comes back) without knowing how it works inside. For a front-end dev, it's mostly the back end's API: URLs returning JSON, REST or GraphQL. But the browser exposes APIs too: the DOM, fetch, localStorage, geolocation. A good API is stable and documented, and when it changes, it warns you (versioning).
The four basic operations on data: Create, Read, Update, Delete. In REST: POST /users to create, GET /users or GET /users/42 to read, PUT (full replacement) or PATCH (partial change) on /users/42 to update, DELETE /users/42 to delete. The detail that makes the difference: GET, PUT and DELETE are idempotent (replaying them gives the same result), POST is not. That's why you never automatically retry a POST after a network error: you could create two orders.
Code someone else can understand and change without fearing they'll break something. The term comes from Robert C. Martin's book. The concrete principles: names that say what the thing does (calculateTotalPrice() rather than calc()), short functions that do one thing, no duplication, no hidden side effects, and comments that explain why rather than what. In Angular, examples speak louder: no logic in templates, components that don't do everything, naming conventions followed everywhere. The best argument: a piece of code you made more readable, and what it changed for the team.
The shared idea: the business core doesn't depend on technical details (framework, database, API). Dependencies always point inward. Hexagonal architecture (ports and adapters) puts it this way: the business defines ports (interfaces: "I need to fetch users"), and adapters implement them (an HTTP adapter, an in-memory test adapter). In Angular: plain TypeScript models and rules in domain/, a repository interface provided through an InjectionToken, and the HTTP implementation in infrastructure/. Benefits: logic can be tested without Angular, and you can swap the data source. A downside to acknowledge: more files. For a small app, it's often too much.
An approach that puts the business at the centre of design, working with domain experts. Key notions: a shared language (the same words in meetings and in code: if the business says "contract", the class is called Contract), bounded contexts ("customer" doesn't mean the same thing for billing and for support), entities (which have an identity), value objects (defined by their values, like an amount with its currency) and aggregates (a group of objects changed together under rules). On the front end, it mostly means one folder per business context and names that match the business.
Two different things, often mixed up. Web Components are browser standards (custom elements, shadow DOM, templates) for building tags you can reuse in any framework. Micro-frontends are an organisation: you split a large app into parts developed and deployed separately, each by one team (in Angular, often with Module Federation or Native Federation). What it brings: autonomous teams. What it costs: dependency versions to align, a design to keep consistent, more JavaScript to load, harder debugging. The sentence that shows perspective: it answers an organisational problem (many teams), rarely a technical one.
A custom element is an HTML tag you create yourself (customElements.define('user-card', ...)), usable like any tag, in any page. Angular Elements (@angular/elements) turns an Angular component into a custom element with createCustomElement(): its inputs become properties and attributes, its outputs DOM events. Use case: embedding an Angular widget in a site that isn't built with Angular (a CMS, a React app). The limitation to mention: the element ships the Angular runtime, so it's heavy for a small component.
Three options, chosen by need. Web Components: built with Angular Elements (simple if the team is Angular, but heavy), or rather with a lightweight tool made for it like Lit or Stencil, and used in both frameworks. Share the design rather than the components: design tokens (colours, spacing, typography) and shared CSS, with each framework having its own component implementation. Share the logic: a framework-free TypeScript library (validation, formatting, API calls). In real life, the last two are often combined: less magical than sharing everything, but much easier to maintain.

Performance & Observability

2
It's the mechanism that keeps the screen in sync with state: when data changes, Angular updates the affected bindings. Historically, zone.js told Angular after every event (click, timer, HTTP response), and Angular re-checked the whole component tree. With the OnPush strategy, a component is only re-checked if an input changes reference, an event comes from it, an async emits or a signal read in its template changes. Hence the importance of immutability: mutating an object in place triggers nothing.
Modern 20262026: new projects have been zoneless since Angular 21 (signals trigger updates) and, since Angular 22, OnPush is the default strategy. The old strategy is now called Eager, and the migration adds it to existing components so they keep their behaviour.
Observability means being able to understand what's happening in production without being on the machine: logs, metrics and traces. On the front end: an error tracking tool (Sentry, or Datadog, New Relic) plugged into a global ErrorHandler, to know which error affects how many users; measuring real-world performance (Core Web Vitals from real visitors, through a RUM tool or Google's reports); and locally, Lighthouse, Chrome's Performance tab and the Angular DevTools profiler. The point not to forget: don't send personal data in error logs.

Testing, Build & CI

7
Test-Driven Development: you write the test before the code. The cycle: a failing test (red), the minimum code to make it pass (green), then you clean up without breaking it (refactor). On the front end, it works very well for pure logic: a pipe, a calculation function, a mapper, a service. It's harder for the UI, which changes often. To put it in place in a team: start where it's natural (business rules), run the tests in CI on every merge request, and lead by example in code review. Be honest about your practice: "I do it for logic, not for every component" is a very good answer.
Start from what you actually did on your last project, then structure it. Unit tests on anything with logic: services, stores, pipes, mappers, guards. Component tests for the interactions that matter (a click, an invalid form), ideally finding elements the way a user would (by their text or role) with Testing Library. A few end-to-end tests (Playwright or Cypress) on critical flows: login, payment, the main form. And say what you don't test: the framework itself, or a display component with no logic.
Modern 20262026: Vitest has been the default test runner for new projects since Angular 21; Karma is deprecated.
A unit test checks a small isolated piece (a function, a service, a component) with its dependencies replaced by fakes: it runs in milliseconds, you have many of them, and when one breaks you know exactly where. An end-to-end test drives a real browser through the whole application, like a user: it proves everything works together, but it's slow, more fragile, and when it breaks you have to dig for why. Hence the pyramid: many unit tests, integration tests in the middle, few end-to-end tests, kept for the flows that must never break.
Few tests, but on the critical flows. Stable selectors that don't depend on styling (see the next question). Independent tests: each one sets up its own data and can run alone, in any order. Never a fixed wait (wait(5000)): wait for a condition (an element visible, a request finished), which Playwright and Cypress already do by retrying assertions. A clear choice between a real back end and mocked responses. And they run in CI, with screenshots or video on failure: an E2E suite you only run by hand ends up not being run at all.
A test-specific attribute, data-cy or data-testid: cy.get('[data-cy="submit"]'). It doesn't move when styling or HTML structure changes, and it clearly says "a test uses this element". To avoid: CSS classes (.btn-primary), position-based selectors (div > p:nth-child(2)) and displayed text if the app is translated.
Modern 20262026: practice has moved towards accessible selectors, which find an element the way a user would (getByRole('button', { name: 'Send' }) with Playwright or Testing Library). Bonus: if the test can't find the button by its role, there's often an accessibility problem.
An honest and accurate answer: in Angular, you almost never configure Webpack by hand. The Angular CLI handles the build: ng serve locally (a dev server that recompiles on every save), ng build for production, and settings go through angular.json (environments, size budgets, assets). What the build does for you: bundle files, minify, remove unused code (tree shaking), split into chunks for lazy loading. You only touch Webpack for a special need, with a custom builder.
Modern 20262026: since Angular 17, the default builder relies on esbuild and Vite, much faster; Webpack only remains in older projects.
The question is ambiguous, and the right reflex is to ask what the person means. The two most likely meanings. In GitLab CI, a job's tags keyword says which runner (which machine) should run it: for example a runner with Docker, or an internal runner with access to the company network. And Git tags (v2.3.0) are often used to trigger a release pipeline: build, test and deploy the tagged version. Around that, you can recap a typical front-end pipeline: install, lint, tests, build, deploy.

Soft skills & Lead

3
There's no right answer, there's an honest one, consistent with your CV. Say where you add the most (for example: "my core is the front end, and I can evolve an API on my own when a feature needs it"), then give a concrete example. What the interviewer checks is whether the role suits you: if you say 90% front end for a role advertised as full-stack, better to say so now than to find out in three months.
Tell one real situation rather than a general method: who, on which project, what you did. The practices that resonate: a prepared onboarding (an up-to-date README, a simple first ticket to ship quickly), pair programming on the first features, code reviews that explain instead of just correcting, increasingly independent tickets, and the junior presenting their own work. End with the outcome: what the person could do alone after a few weeks.
It's rarely measured precisely, and it's fine to say so. What you can observe: fewer back-and-forths in code review, types of tickets the person now handles alone that they couldn't before, fewer questions on the same topics, the day they start reviewing others' code. Add direct feedback (regular check-ins, what the person says about it). Don't make up a percentage: interviewers dig, and a true example beats a fragile number.
Lead magnet · FreeSoon

The Angular interview pack, as a PDF

All 53 questions + answers, laid out to revise offline (train, waiting room, the night before). Just your email, nothing more.

The PDF pack is coming very soon, check back.

See resources