Frontend · Fresher-relevant
Angular interview questions on components, directives, services, RxJS, and the Angular CLI — common at enterprise IT services companies.
Commonly asked at: Commonly asked at enterprise product companies and consultancies such as Infosys, Cognizant, and Accenture — general pattern, not company-verified.
Company names below are mentioned only to indicate the general type/level of interview these questions are common at, based on widely known industry patterns. This content is not affiliated with, endorsed by, or sourced from any confidential material of the named companies. All trademarks belong to their respective owners.
What is Angular, and how is it different from React?
Tip: Frame it as "framework vs library" — that's the core distinction interviewers listen for.
Angular is a full framework with built-in routing, forms, HTTP handling, and dependency injection — React is just a UI rendering library, so you usually add separate libraries for those things. Angular also uses TypeScript by default and follows a more opinionated, structured architecture.
What are components in Angular?
Tip: Mention the three parts — template, class, styles — that's the expected structure of the answer.
A component is Angular's basic UI building block — it combines an HTML template, a TypeScript class for logic, and CSS for styling. Every app has at least a root component, and complex UIs are built by composing smaller ones together.
What is dependency injection in Angular?
Tip: Say why it helps testing — that's usually the "so what" interviewers are checking for.
Dependency injection means a class receives its dependencies from an external source instead of creating them itself. Angular has a built-in DI system — you declare a dependency in a constructor, and Angular's injector provides the right instance, which makes testing and swapping implementations much easier.
Component vs service — what's the difference?
Tip: Give one concrete example pairing — like AuthService and LoginComponent — it's the clearest way to explain it.
A component handles the UI — what's rendered and how users interact with it. A service holds reusable logic or data-fetching code not tied to a specific view, shared across components via dependency injection — like an AuthService used by a LoginComponent.
What are Angular directives?
Tip: Split the answer into attribute vs structural directives — that's the standard categorization expected.
Directives are instructions applied to DOM elements — attribute directives change appearance or behavior, like `ngClass` or `ngStyle`, while structural directives change the DOM structure itself, like `*ngIf` or `*ngFor`. Components are technically a special kind of directive with a template attached.
What is two-way data binding in Angular?
Tip: Name the exact syntax — `[(ngModel)]` — interviewers usually want to hear it explicitly.
Two-way binding keeps the UI and the underlying model in sync automatically — change one, and the other updates too. Angular implements this with `[(ngModel)]`, which combines property binding and event binding into one syntax, most commonly used in forms.
What is RxJS, and why does Angular use it?
Tip: Contrast it briefly with Promises — that comparison usually satisfies the "why RxJS" part of the question.
RxJS is a reactive programming library built around Observables, which represent streams of data over time. Angular uses it for HTTP requests, events, and reactive forms because Observables support cancellation, retries, and combining multiple async streams — things plain Promises can't do.
NgModules vs standalone components — what's the difference?
Tip: Mention this is a newer Angular direction — shows you're aware of current best practices.
Traditionally Angular grouped components and services into NgModules to organize the app. Newer Angular versions support standalone components that import their own dependencies directly, without needing to be declared in a module — it simplifies the mental model and cuts boilerplate.
What is change detection in Angular, and what is OnPush strategy?
Tip: Mention OnPush as a performance optimization — that's usually the point of the question.
Change detection is how Angular checks whether data has changed and updates the DOM accordingly. By default it checks the whole component tree on every event, but the OnPush strategy tells Angular to only re-check a component when its input references change, which can significantly improve performance in large apps.
⭐ Scenario: You're seeing performance issues in a large Angular app with a big list rendered on screen. How would you diagnose and fix it?
Tip: This is scenario-based — mention concrete Angular tools you'd actually use to diagnose, not just generic advice.
Situation: A large Angular app was lagging noticeably when rendering a big list with frequent updates.
Task: I needed to identify the bottleneck and improve rendering performance without changing the feature's behavior.
Action: I used Angular DevTools to check change detection cycles and found the default strategy was re-checking the whole tree unnecessarily; I switched the list component to OnPush and added `trackBy` to the `*ngFor` so Angular wouldn't re-render unchanged items.
Result: The list rendering became noticeably smoother, since Angular only re-checked what had actually changed instead of the entire list on every update.
InterviewEra generates role-specific questions using your actual projects and skills. Get scored feedback on technical depth, clarity, and structure — free to start.