Angular Interview Master
Curated 200+ Angular interview questions covering Angular 17/18 Signals, RxJS, Change Detection, Dependency Injection, and Routing.
Difficulty Filters
Tools & Options
What is Angular?
Angular is a platform and framework for building single-page client applications using HTML and TypeScript. It is developed and maintained by Google and provides a set of tools for building scalable and high-performance web applications.
What are the key features of Angular?
Key features include Component-based architecture, Two-way data binding, Dependency Injection, Templates, Directives, Pipes, Routing, and RxJS integration.
What is TypeScript?
TypeScript is a superset of JavaScript that adds static typing. Angular is built with TypeScript, which provides better tooling, refactoring capabilities, and helps catch errors at compile-time.
What is a Component in Angular?
What is a Template?
What is Data Binding?
Difference between Angular and AngularJS?
What are Directives?
What is an Angular Module (@NgModule)?
What is Dependency Injection?
What are Pipes in Angular?
What is the purpose of the 'async' pipe?
What is Interpolation?
What is Property Binding?
What is Event Binding?
What is Two-way Data Binding?
What is a Service in Angular?
What is the @Injectable() decorator?
Explain Angular Life Cycle Hooks.
What is ngOnInit()?
What is ngOnDestroy()?
What is the Angular CLI?
How do you create a component using CLI?
What is a Single Page Application (SPA)?
What is the purpose of main.ts?
What is the purpose of polyfills.ts?
What is a Selector?
What is bootstrapping in Angular?
What is @Input() decorator?
What is @Output() decorator?
What is EventEmitter?
What are Structural Directives?
What are Attribute Directives?
Difference between *ngIf and hidden property?
What is the purpose of index.html?
What is package.json?
What is angular.json?
What is a constructor?
Difference between constructor and ngOnInit?
How to perform an HTTP request in Angular?
What is an Observable?
What is the subscribe() method?
How to handle errors in HTTP requests?
What is a Promise?
Observable vs Promise?
What is Routing in Angular?
What is router-outlet?
What is routerLink?
What is an Interceptor?
What is ViewEncapsulation?
Difference between Reactive Forms and Template-driven Forms?
What is the purpose of FormBuilder?
What is FormArray?
Explain Angular Dependency Injection hierarchy.
What are Route Guards?
What is Lazy Loading?
How to implement Lazy Loading?
What is the purpose of Resolve guard?
What is NgZone and why is it used?
Explain Change Detection strategies.
How does OnPush strategy work?
What is the purpose of ChangeDetectorRef?
What is Subject in RxJS?
Difference between Subject and BehaviorSubject?
What is ReplaySubject?
Explain Content Projection.
What is @ViewChild and @ViewChildren?
What is @ContentChild and @ContentChildren?
What is an Angular Library?
How to share data between components?
What are Dynamic Components?
What is the purpose of 'trackBy' in *ngFor?
How to optimize Angular app bundle size?
What is AOT vs JIT compilation?
What is tree-shaking?
Explain Angular Signals (New in v16).
WritableSignal vs ComputedSignal?
What is effect() in Signals?
What are Standalone Components (v14+)?
How to bootstrap a Standalone Application?
What is ProvideHttpClient (Standalone)?
What is 'switchMap' vs 'mergeMap'?
What is 'exhaustMap'?
What is 'concatMap'?
Explain Custom Validators in Reactive Forms.
What is AsyncValidator?
What is the purpose of 'HostListener'?
What is 'HostBinding'?
What is an Angular Workspace?
How to use 'provide' in DI?
What is InjectionToken?
What is Multi-provider?
Explain 'Strict Template Checking'.
What is the 'Hydration' in Angular v16?
What is SSR (Angular Universal)?
How to handle memory leaks in Angular?
What is 'takeUntil' and why use it?
What is Angular DevTools?
Explain 'Schematics' in Angular CLI.
What is 'ng update'?
Deep Dive: How does Zone.js work?
Angular Architecture: Modular vs Standalone.
State Management: Why NgRx?
Explain 'Signals' vs 'RxJS' for Reactivity.
What is 'Micro Frontends' in Angular?
Module Federation: How to implement?
How to implement Custom Pipes with DI?
Performance: Preloading Strategies.
Explain 'Deferred Loading' (@defer)?
How to use @defer with 'on viewport'?
What is 'Zone-less' Angular?
Security: What is DomSanitizer?
What is Cross-Site Request Forgery (CSRF) protection in Angular?
Explain 'ViewContainerRef' for Dynamic UI.
What is 'Renderer2' and why prefer it over direct DOM access?
Web Workers in Angular: Why and How?
Explain 'Interceptors' with Metadata.
What is 'Route Reuse Strategy'?
How to perform 'Manual Hydration'?
Angular Testing: Spectator Library.
Unit Testing: Component Harnesses.
End-to-End Testing: Cypress vs Playwright.
Explain 'InjectionContext' and 'runInInjectionContext'.
What is 'Environment Decorator' (@Injectable({providedIn: 'root'}))?
Explain 'Input Transforms' (v16.1).
What is 'Self', 'SkipSelf', 'Optional', and 'Host'?
Explain 'ForwardRef' in DI.
How to handle 'Custom Elements' (Angular Elements)?
Explain 'TemplateRef' vs 'ViewRef'.
What is the 'ModuleID' in older versions?
Explain 'NgPlural' Directive.
Performance: 'ChangeDetectionStrategy.OnPush' deep dive.
What is 'untracked' in Signals?
Explain 'take (1)' vs 'first ()'.
What is 'shareReplay' and its dangers?
Explain 'Router Link Active' directive.
What is 'Auxiliary Routes' (Named Outlets)?
Explain 'Route Matchers'.
Angular Security: Content Security Policy (CSP).
Explain 'NgZone.run' vs 'NgZone.runOutsideAngular'.
What is 'ModuleWithProviders'?
Explain 'Embedded Views' vs 'Host Views'.
How to handle 'Recursive Data' in templates?
What is '@Attribute' decorator?
Explain 'KeyValueDiffers' service.
What is 'IterableDiffers'?
Explain 'SecurityContext' in Sanitization.
How to use 'provideAnimations'? (v15+)
What is 'ApplicationRef'?
Explain 'ComponentRef' instance properties.
Implement a Writable Signal and Update it.
Create a Computed Signal.
Fetch data using HttpClient and handle errors.
Implement a Reactive Form with Validation.
Implement a simple Directive for Hover Effect.
Create a Custom Pipe to Reverse String.
Use 'switchMap' for Search Logic.
Dynamic Component Injection (v13+).
Implement a Route Guard (Functional).
Combine multiple Observables together.
Implement a Debounce Search.
Create a Singleton Service.
Handle Multiple Async Pipes.
Implement a custom form validator.
Use trackBy in *ngFor.
Navigate programmatically with Router.
Capture Route Parameters.
Create a behavior subject for state shared.
Use 'takeUntil' for cleanup.
Lazy load a component manually.
Implement an HTTP Interceptor.
Convert Observable to Signal.
Convert Signal to Observable.
Implement Signal effect.
Global Error Handler.
Input Transform (Boolean).
Signal equality function.
Signal 'update' with object mutate.
Access @ViewChild DOM element.
NgFor object properties.
Sort array using pipe.
Signal based form binding.
Handle route change event.
Custom structural directive.
Access Host element attributes.
Implement infinite scroll logic.
Caching HTTP requests.
NgRx Action and Reducer.
NgRx Selector.
Unit Test a Service.
Mock an HTTP call in tests.
Test a component with @Input.
Trigger click event in unit test.
Standalone route configuration.
Environment variable access.
Dynamic Meta Tags.
Update Title programmatically.
Signal inside a Service.
Recursive Route children.
Conditional polyfill loading.
Technical Interview Mastery Blueprint
Proven methodologies and frameworks to succeed in technical and architecture rounds.
1. The Engineering STAR Technique
When responding to architectural or situational questions, structure your answer using Situation, Technical Constraint, Action, and Measurable Result. Rather than jumping straight to syntax, articulate the business problem, why certain patterns (e.g. caching, queuing, immutability) were selected over alternatives, and what latency or throughput improvements were achieved.
2. Defending Architectural Trade-Offs
Senior interviewers evaluate how you weigh trade-offs. Always explain why you chose an approach: e.g., memory overhead vs CPU cycle speed, consistency vs availability (CAP theorem), or normalized schemas vs denormalized fast reads. Stating the drawbacks of your own proposal demonstrates maturity and production experience.
3. Clean Code & Edge-Case Proactivity
In live-coding rounds, communicate your thinking aloud before typing. State edge cases explicitly: null or undefined inputs, extreme boundary values, concurrency races, and network timeouts. Writing modular, well-named functions with deterministic unit tests separates junior candidates from staff-level engineers.
4. Antipatterns to Avoid
Avoid reciting memorized definitions without practical context. Never dismiss non-functional requirements such as security (CSRF, injection, token rotation), observability (logging, metrics), and accessibility (ARIA, semantic standards). Always ask clarifying scope questions before writing complex implementations.
Explore Related Tools
Hand-picked utilities and calculators related to this tool.
