Angular Interview Questions
Components, data binding, dependency injection, directives, RxJS observables, change detection, routing, forms, signals and performance.
61 questions
Popular Searches
1. What is Angular and how does it differ from AngularJS?
easyFundamentals 6 mins2. What is a component in Angular and what does its decorator contain?
easyComponents 6 mins3. What is data binding in Angular and what are its four forms?
mediumTemplates 6 mins4. What is dependency injection in Angular and how does the injector hierarchy work?
mediumArchitecture 7 mins5. What are Angular directives and how do structural and attribute directives differ?
easyDirectives 6 mins6. What is the difference between a component and a service in Angular?
easyArchitecture 6 mins7. What is two-way data binding and how does ngModel implement it?
mediumData Binding 6 mins8. What are Angular lifecycle hooks and in what order do they run?
mediumComponents 7 mins9. What is the difference between ngOnInit and a constructor in Angular?
easyComponents 6 mins10. What are Observables and how does RxJS power Angular's async handling?
mediumRxJS & Reactivity 7 mins11. What is the difference between an Observable and a Promise in Angular?
mediumRxJS & Reactivity 6 mins12. What is change detection in Angular and how does the OnPush strategy optimize it?
hardPerformance 8 mins13. What is Zone.js and what role does it play in Angular change detection?
mediumChange Detection 7 mins14. What are Angular pipes and how do pure and impure pipes differ?
mediumTemplates 7 mins15. What is the Angular router and how does route configuration work?
mediumRouting 7 mins16. What are route guards in Angular and what types exist?
mediumRouting 7 mins17. What is lazy loading in Angular and how does it improve performance?
mediumPerformance 7 mins18. What are Angular modules (NgModules) and what is their purpose?
easyArchitecture 6 mins19. What are standalone components in Angular and why were they introduced?
mediumComponents 6 mins20. What is the difference between template-driven and reactive forms in Angular?
mediumForms 6 mins21. How does form validation work in Angular reactive forms?
mediumForms 6 mins22. What is an Angular service and how is the @Injectable decorator used?
easyDependency Injection 6 mins23. What is content projection and how does ng-content work in Angular?
mediumComponents 6 mins24. What is the difference between ViewChild and ContentChild in Angular?
mediumComponent Interaction 7 mins25. How does the HttpClient work in Angular and what are interceptors?
mediumHTTP & Networking 7 mins26. What is the async pipe in Angular and why is it recommended?
easyTemplates & Pipes 6 mins27. What are Angular signals and how do they differ from Observables?
mediumReactivity 8 mins28. What is ahead-of-time (AOT) compilation in Angular and why does it matter?
mediumCompilation 6 mins29. How do you optimize the performance of an Angular application?
hardPerformance 8 mins30. What is the difference between ElementRef, TemplateRef, and ViewContainerRef in Angular?
hardDOM & Views 8 mins31. Why does an OnPush component fail to update when you mutate an input object, and how do you fix it?
hardChange Detection 9 mins32. How do you detect and fix RxJS subscription leaks in a long-running Angular application?
hardRxJS 10 mins33. What causes ExpressionChangedAfterItHasBeenCheckedError and how do you resolve it properly?
hardChange Detection 9 mins34. When would you use NgZone.runOutsideAngular, and how do you get back into the zone safely?
hardPerformance 9 mins35. What is zoneless change detection in Angular and what has to change in an existing app to adopt it?
hardChange Detection 10 mins36. How do toSignal and toObservable work, and what are the pitfalls when mixing signals with RxJS?
hardSignals 10 mins37. How do you scope an Angular service to a single component or route, and what lifecycle traps come with it?
hardDependency Injection 10 mins38. How do you diagnose and reduce an oversized Angular production bundle?
hardBuild and Tooling 10 mins39. How do you test an Angular component that depends on async streams, timers and HTTP?
hardTesting 10 mins40. What causes hydration mismatch errors in Angular SSR and how do you fix them?
hardServer-Side Rendering 10 mins41. How do you design HTTP error handling and a retry strategy for an Angular application in production?
hardHttpClient 10 mins42. A route in your Angular app takes seconds to appear after the click. How do you diagnose and fix it?
hardRouter 10 mins43. How does Angular protect against XSS, and when is bypassSecurityTrust actually justified?
hardSecurity 10 mins44. How do you render a list of tens of thousands of rows in Angular without the UI freezing?
hardPerformance 10 mins45. A large Angular reactive form becomes sluggish as the user types. What is happening and how do you fix it?
hardForms 10 mins46. How do you plan and execute an Angular major-version upgrade on a large production application?
mediumTooling 9 mins47. How do you decide between plain services, signal-based stores and a full state library in a large Angular app?
hardArchitecture 10 mins48. How do you implement global error handling and client-side logging in an Angular application?
mediumObservability 10 mins49. How do deferrable views work in Angular, which trigger would you choose, and how do you test them?
mediumPerformance 9 mins50. How do you cache HTTP responses in Angular, and what are the traps with shareReplay?
hardRxJS 10 mins51. How do you configure environment-specific settings in Angular without rebuilding for every environment?
mediumBuild & Deployment 9 mins52. Interactions in your Angular app feel laggy. How do you profile change detection and find the culprit?
hardPerformance 10 mins53. What is an InjectionToken in Angular, and when would you use a multi provider?
mediumDependency Injection 8 mins54. What is the difference between the environment injector and the element injector in Angular?
hardDependency Injection 9 mins55. What is DestroyRef in Angular, and what does takeUntilDestroyed need from an injection context?
mediumRxJS and Lifecycle 8 mins56. What is the difference between markForCheck, detectChanges and detach on ChangeDetectorRef?
hardChange Detection 9 mins57. How do computed signals and effects differ in Angular, and when does each actually run?
hardSignals 9 mins58. How do you make a custom structural directive type-safe in Angular templates?
hardDirectives 9 mins59. How do you control when Angular form validation runs, and how do async validators fit in?
hardForms 9 mins60. When should you use a route resolver in Angular instead of loading data inside the component?
mediumRouting 9 mins61. What are host directives in Angular and when would you use them instead of inheritance?
mediumComponents and Directives 8 mins