Skip to content
TryHired.
Interview prep · Technical · checked against the official docs

Angular interview questions: answers checked against the docs

Modern Angular questions on components, signals and change detection, answered in plain words and checked against angular.dev.

Updated Nov 15, 2026 · Facts checked against the official documentation · questions: TryHired
Quick answer

Angular interviews now focus on standalone components, signals (signal, computed, set and update), input(), the built-in @if and @for control flow (and why @for needs track), dependency injection with inject(), lifecycle hooks, pure pipes and zoneless change detection, plus how these differ from older Angular. Below are 12 questions; each answer lists the angular.dev page it was checked against.

Basic

Basic angular interview questions

Advice

Basic1. What are the parts of an Angular component?

A component has a TypeScript class for its behavior, an HTML template for what it renders, and a CSS selector that says where it is used. Styles are optional. Metadata goes in the @Component decorator.

TypeScript / template snippet · illustrative, not run on this page
@Component({
  selector: 'job-card',
  template: `<h3>{{ title() }}</h3>`,
})
export class JobCard {
  title = input.required<string>();
}

Checked against: Angular docs: components

Basic2. What is a standalone component?

A component that declares its own dependencies in an imports array instead of belonging to an NgModule. Components are standalone by default in current Angular; older code may still use NgModules with standalone: false.

Checked against: Angular docs: components

Basic3. How do you pass data into a component?

Declare inputs with the input() function (or the older @Input decorator) and bind them from the parent template. input() returns a signal you read by calling it, and it must be used in a property initializer.

TypeScript / template snippet · illustrative, not run on this page
// child
company = input<string>('');
// parent template
<job-card [company]="'Acme'" />

Checked against: Angular docs: inputs

Basic4. What is the difference between @if and the older *ngIf?

@if is the built-in control flow block: it renders its content when the condition is truthy, with @else if and @else branches, and needs no import. *ngIf is the earlier structural directive that does the same job; new code generally uses the block syntax.

TypeScript / template snippet · illustrative, not run on this page
@if (jobs().length > 0) {
  <p>{{ jobs().length }} open roles</p>
} @else {
  <p>No roles yet</p>
}

Checked against: Angular docs: control flow

Intermediate

Intermediate angular interview questions

Advice

Intermediate5. Why does @for require track?

track gives each item an identity, so when the list changes Angular can move, add or remove only the affected DOM nodes instead of re-creating the whole list. Track by a stable id. An optional @empty block renders when the list is empty.

TypeScript / template snippet · illustrative, not run on this page
@for (job of jobs(); track job.id) {
  <li>{{ job.title }}</li>
} @empty {
  <li>No roles yet</li>
}

Checked against: Angular docs: control flow

Intermediate6. What are signals?

A signal wraps a value and notifies anything that reads it when the value changes. You read it by calling it, change it with set() or update(), and derive values with computed(), which is read-only and recalculates when its inputs change.

TypeScript / template snippet · illustrative, not run on this page
count = signal(0);
double = computed(() => this.count() * 2);
increment() { this.count.update(v => v + 1); }

Checked against: Angular docs: signals

Intermediate7. How does dependency injection work in Angular?

Services are provided to an injector, and components or other services ask for them, usually with the inject() function. providedIn: 'root' registers a single app-wide instance that can be tree-shaken if unused.

TypeScript / template snippet · illustrative, not run on this page
@Injectable({ providedIn: 'root' })
export class JobsService { }

export class JobList {
  private jobs = inject(JobsService);
}

Checked against: Angular docs: dependency injection

Intermediate8. What are ngOnInit and ngOnDestroy for?

ngOnInit runs once after Angular has set the component's initial inputs, so it is the place for setup that depends on them (the constructor runs earlier). ngOnDestroy runs once before the component is removed, the place to clean up timers and subscriptions.

Checked against: Angular docs: component lifecycle

Intermediate9. What is a pure pipe?

Pipes transform values in templates, such as date or currency. By default they are pure: Angular re-runs them only when a primitive input changes or an object reference changes, not when you mutate the same array or object. That is why mutating an array can leave a pipe's output stale.

TypeScript / template snippet · illustrative, not run on this page
<p>{{ posted | date: 'mediumDate' }}</p>

Checked against: Angular docs: pipes

Advanced

Advanced angular interview questions

Advice

Advanced10. What does zoneless change detection mean?

Angular used to rely on Zone.js to detect when something async might have changed state. Zoneless change detection drops that dependency and updates the view from explicit signals, events and similar notifications. It is the default from Angular v21.

Checked against: Angular docs: zoneless

Advanced11. When would you use computed() rather than storing a derived value?

Use computed() for anything derived from other signals, such as a filtered list or a total. It recalculates only when a signal it reads changes, so there is no second copy of state to keep in sync.

TypeScript / template snippet · illustrative, not run on this page
jobs = signal<Job[]>([]);
remote = computed(() => this.jobs().filter(j => j.remote));

Checked against: Angular docs: signals

Advanced12. Why might a list not update after you push an item to an array?

Two common reasons: the value is held in a signal or input but was mutated in place, so nothing reported a change, or a pure pipe receives the same array reference. Create a new array instead, for example with update(list => [...list, item]).

TypeScript / template snippet · illustrative, not run on this page
jobs.update(list => [...list, newJob]);

Checked against: Angular docs: pipes, Angular docs: signals

Practice

How to practice with this page

Advice
  • Know both styles: modern (signals, @if, inject) and older (NgModules, *ngIf, constructor injection).
  • Explain change detection in your own words; it is a frequent deep-dive.
  • Build a small component with an input, a computed value and an @for list.
  • Brush up on TypeScript and RxJS: they often come up in Angular interviews.
Next

Related interview prep and tools

Disclosure: TryHired makes HIRED, a paid job-search program, so we have a conflict of interest when we mention it. This question bank is free, with no TryHired signup.

FAQ

Questions people ask

Are these Angular answers tested?
The facts are checked against the official Angular documentation (angular.dev), saved when the page was built. The snippets are short illustrations and were not run in an Angular project.
Which Angular version should I prepare for?
Ask which version the team uses. Newer Angular uses standalone components, signals, input() and the @if/@for control flow; older codebases use NgModules, @Input, *ngIf and Zone.js, and interviewers often ask how you would migrate.
What else comes up in Angular interviews?
RxJS and observables, routing and guards, forms (reactive and template-driven), HTTP calls, testing, performance (change detection, lazy loading) and TypeScript itself.
Method

How this page is built

TryHired wrote these questions and answers. Statements about the technology were checked against the official documentation pages listed below, saved when the page was built (2026-11-15). The code snippets are short illustrations and were not run on this page. The question list is general practice: it does not predict what a particular employer will ask.

What this page can't tell you
  • Interviewers ask different questions for different roles and levels.
  • Answers are short explanations, not complete references.
  • No Angular code was run on this page; the snippets follow current angular.dev syntax and may differ from older Angular versions.
Sources
  1. Angular docs: components (read 2026-11-15)
  2. Angular docs: control flow (read 2026-11-15)
  3. Angular docs: dependency injection (read 2026-11-15)
  4. Angular docs: inputs (read 2026-11-15)
  5. Angular docs: component lifecycle (read 2026-11-15)
  6. Angular docs: pipes (read 2026-11-15)
  7. Angular docs: signals (read 2026-11-15)
  8. Angular docs: zoneless (read 2026-11-15)