Architecture and Core Concepts
Explain the Angular architecture and its key components.
What is the difference between AngularJS and Angular (2+ versions)?
How does Angular handle dependency injection?
What are Angular decorators, and how are they used?
Explain the purpose of
NgModule
and its role in Angular applications.
Change Detection and Performance
How does Angular's change detection mechanism work?
What is the difference between
Default
andOnPush
change detection strategies?How can you optimize the performance of an Angular application?
What is lazy loading, and how is it implemented in Angular?
Explain the concept of tree shaking in Angular.
RxJS and Observables
What is RxJS, and why is it important in Angular?
Explain the difference between
Observable
andSubject
.How do you handle error handling in RxJS streams?
What are some commonly used RxJS operators, and how do they work?
How do you unsubscribe from observables to prevent memory leaks?
Routing and Navigation
How does Angular's router work?
What is the difference between eager loading and lazy loading in routing?
How do you implement route guards in Angular?
What is the purpose of
ActivatedRoute
, and how is it used?How do you handle query parameters and route parameters in Angular?
- What is AuthGuard in Angular?
Forms and Validation
What is the difference between template-driven and reactive forms in Angular?
How do you implement custom form validators?
How do you handle dynamic forms in Angular?
What is the purpose of
FormBuilder
, and how is it used?How do you handle form validation and error messages?
Advanced Topics
What is Angular Universal, and how does it enable server-side rendering?
How do you implement internationalization (i18n) in Angular?
What is the purpose of
Zone.js
in Angular?How do you create and use custom directives in Angular?
What is the difference between
ViewChild
andContentChild
?
Testing and Debugging
How do you write unit tests for Angular components and services?
What is the purpose of
TestBed
in Angular testing?How do you debug Angular applications effectively?
What tools can you use to profile and optimize Angular applications?
How do you test asynchronous code in Angular?