Angular Interview Questions and Answers

Angular interviews check that you understand the framework's building blocks: components, templates and data binding, directives, pipes, services and dependency injection, modules versus standalone components, and the component lifecycle hooks.

The harder questions concern behaviour: how change detection works and when OnPush helps, RxJS operators (switchMap, mergeMap, debounceTime) and unsubscribing, reactive versus template-driven forms, route guards and lazy loading, and how you would test and optimise a large application.

Questions

Related

Frequently asked questions

What is change detection in Angular?

The process that checks component data against the template and updates the DOM. By default it checks every component after each event; OnPush limits it to input changes and explicit triggers.

switchMap versus mergeMap?

switchMap cancels the previous inner observable when a new value arrives (good for search-as-you-type); mergeMap runs them all in parallel.

How do I prepare for an Angular interview?

Know DI, change detection and RxJS well, build a small app with routing and reactive forms, and be ready to explain how you would optimise a slow screen.