MEAN Stack Interview Questions & Answers
All 200 unique questions in one place — 61 easy, 95 medium, 44 hard — grouped by topic.
Practise by topic
Practise the way your interview works
What is the difference between an interface and a type alias in TypeScript?
Show answer
What are decorators in TypeScript and how does Angular use them?
Show answer
Explain optional chaining and nullish coalescing with examples.
Show answer
What is the difference between an Observable and a Promise?
Show answer
An API sometimes returns null for a nested field and the Angular app crashes with cannot read properties of undefined. How do you fix it properly?
Show answer
You need a dropdown value that can only be 'pending', 'shipped' or 'delivered'. How do you model it so invalid values are impossible?
Show answer
Define TypeScript interfaces for a paginated API response and use them in a service method.
Show answer
Tell me about a time strong typing helped you catch a bug before it reached production.
Show answer
Explain the any, unknown and never types in TypeScript.
Show answer
What are generics in TypeScript? Give an Angular-related example.
Show answer
What are TypeScript utility types such as Partial, Pick, Omit and Record used for?
Show answer
What is type narrowing and what are type guards?
Show answer
What do the strict compiler options in tsconfig.json do?
Show answer
A teammate uses any everywhere to silence TypeScript errors. How would you address it?
Show answer
Write a generic TypeScript function that groups an array of items by a key.
Show answer
Write a custom type guard to check whether an API response is an error.
Show answer
Write a debounced search helper in TypeScript using a closure.
Show answer
Show the tsconfig settings you would enable for a strict Node.js Express API.
Show answer
How do you approach learning a new framework version or language feature on the job?
Show answer
How do you set and enforce TypeScript coding standards across a development team?
Show answer
What are discriminated unions and why are they useful?
Show answer
Frontend and backend models keep drifting apart, causing runtime bugs. How would you keep them in sync in a MEAN project?
Show answer
You are migrating a large JavaScript Node.js codebase to TypeScript. How would you approach it?
Show answer
Write an exhaustive switch over a union type using never.
Show answer
What is Angular and how is it different from a library like React?
Show answer
What is an Angular component and what are its main parts?
Show answer
What are standalone components and why are they now the default?
Show answer
Explain the four types of data binding in Angular.
Show answer
What is the new built-in control flow syntax in Angular templates?
Show answer
How do parent and child components communicate in Angular?
Show answer
The same card layout with an image, title and actions is copied across ten pages. How would you refactor it?
Show answer
An Angular page needs to show different content for admin and normal users. How would you implement it in the template?
Show answer
Write a standalone Angular component that displays a list of products using @for.
Show answer
Write a custom pure pipe that shortens long text with an ellipsis.
Show answer
List the Angular CLI commands you use most often in a project.
Show answer
Tell me about a time you had to understand a large unfamiliar Angular codebase quickly.
Show answer
Why do you want to work with the MEAN stack and Angular specifically?
Show answer
What are Angular's lifecycle hooks and when is each typically used?
Show answer
What are directives in Angular and what types exist?
Show answer
What are pipes in Angular and what is the difference between pure and impure pipes?
Show answer
How does change detection work in Angular, and what does OnPush do?
Show answer
What are @defer blocks and how do they help performance?
Show answer
A product list with 2,000 rows re-renders slowly whenever any data changes. How do you optimise it?
Show answer
Create a child component with a signal input and an output that emits when a button is clicked.
Show answer
Write a custom attribute directive that highlights an element on hover.
Show answer
What is zoneless change detection in Angular?
Show answer
You see ExpressionChangedAfterItHasBeenCheckedError in development. What does it mean and how do you fix it?
Show answer
Your Angular app's initial bundle is very large and the first page loads slowly. What steps would you take?
Show answer
A third-party chart component inside an Angular page causes performance issues because it triggers too many change detection cycles. What can you do?
Show answer
What is a service in Angular and why should business logic live there?
Show answer
Explain dependency injection in Angular.
Show answer
How is routing configured in a standalone Angular application?
Show answer
How do you read route parameters and query parameters in an Angular component?
Show answer
Two components on different pages need to share the selected city filter. How would you implement it?
Show answer
After deploying the Angular app behind a load balancer, navigating directly to /orders/42 gives a 404. What is wrong?
Show answer
What does providedIn: 'root' mean and what are other ways to provide a service?
Show answer
What is the inject() function and how does it compare to constructor injection?
Show answer
What are injection tokens and when do you need them?
Show answer
How does lazy loading work with the Angular router?
Show answer
What are route guards and what kinds exist in modern Angular?
Show answer
What is a route resolver and when would you use one?
Show answer
Users lose a long half-filled form when they accidentally click a menu link. How would you prevent this?
Show answer
Your app must call different API base URLs for development, staging and production. How do you configure this in Angular?
Show answer
Write an injectable service that fetches and caches a list of categories.
Show answer
Configure routes with lazy loading, a child route and a wildcard 404 route.
Show answer
Write a functional auth guard that redirects unauthenticated users to the login page.
Show answer
Provide a configuration object through an InjectionToken and use it in a service.
Show answer
Tell me about a time you improved the structure of an Angular application.
Show answer
Describe how you handled a situation where requirements changed late in a sprint.
Show answer
What is hierarchical dependency injection in Angular?
Show answer
Admin routes are protected by a guard, but the admin feature code is still downloaded by every user. How do you fix this?
Show answer
Write a role-based canMatch guard that only matches admin users.
Show answer
Write a resolver that loads a product before the detail page opens.
Show answer
How do you decide where state should live in a large Angular application?
Show answer
What are signals in Angular and why were they introduced?
Show answer
What is the difference between signal, computed and effect?
Show answer
What is RxJS and why is it important in Angular?
Show answer
Create a counter component with signal, computed and effect.
Show answer
What is the difference between a cold and a hot Observable?
Show answer
What are Subject, BehaviorSubject, ReplaySubject and AsyncSubject?
Show answer
How do you avoid memory leaks from subscriptions in Angular?
Show answer
How do toSignal and toObservable bridge RxJS and signals?
Show answer
Implement a type-ahead search box that calls the API only after the user pauses typing and ignores outdated results. Which RxJS approach would you use?
Show answer
Users double-click the Pay button and two payment requests are sent. How would you prevent it on the frontend?
Show answer
A dashboard needs data from three independent APIs before it can render. How would you load them?
Show answer
A component subscribes to a service Observable in ngOnInit, and after navigating back and forth several times, the API is called multiple times per action. What is wrong?
Show answer
Write a type-ahead search using a reactive FormControl and RxJS operators.
Show answer
Load three APIs in parallel with forkJoin and handle a failure in one of them.
Show answer
Write a cart service using signals with computed totals.
Show answer
Tell me about a time you fixed a difficult asynchronous bug.
Show answer
Describe a time you helped a teammate who was struggling with RxJS.
Show answer
What is linkedSignal and when would you use it?
Show answer
What are the resource and httpResource APIs in Angular?
Show answer
Explain the difference between switchMap, mergeMap, concatMap and exhaustMap.
Show answer
What is NgRx and when is it worth using in an Angular application?
Show answer
A shared service exposes state through a BehaviorSubject, and components mutate the emitted object directly, causing bugs. How do you redesign it?
Show answer
You need to poll an order status API every five seconds until the order is delivered. How would you implement it?
Show answer
Use httpResource to load a product whenever the selected id signal changes.
Show answer
How would you convince your team to adopt signals in an existing RxJS-heavy codebase?
Show answer
What is the difference between template-driven and reactive forms in Angular?
Show answer
What are FormControl, FormGroup, FormArray and FormBuilder?
Show answer
How do built-in and custom validators work in reactive forms?
Show answer
What is HttpClient and how is it set up in a standalone Angular app?
Show answer
A registration form must check that password and confirm password match. How would you implement this?
Show answer
Build a reactive login form with validation using NonNullableFormBuilder.
Show answer
How do you handle disagreements with a UI designer about how a form should behave?
Show answer
What are typed reactive forms?
Show answer
What are async validators and when do you use them?
Show answer
What are HTTP interceptors and what are common use cases?
Show answer
How should HTTP errors be handled in an Angular application?
Show answer
What is the difference between valueChanges and statusChanges, and what does updateOn do?
Show answer
An order form lets users add any number of items with product, quantity and price. How do you build it?
Show answer
Users complain that the app shows a blank screen whenever the backend is down. How do you improve this?
Show answer
A form must show fields based on earlier answers, such as company name only when employment type is salaried. How would you build it?
Show answer
Users upload large documents and want to see upload progress. How do you implement it in Angular?
Show answer
Write a custom validator that rejects passwords without a number and an uppercase letter.
Show answer
Write a group validator that checks password and confirm password match.
Show answer
Write a functional HTTP interceptor that adds a JWT and handles 401 errors.
Show answer
Tell me about a complex form you built and the challenges you solved.
Show answer
What is a ControlValueAccessor and why would you implement one?
Show answer
What are Signal Forms in Angular?
Show answer
Every API request needs a JWT header, and expired tokens should trigger a refresh without logging the user out. How do you implement this?
Show answer
Build a dynamic FormArray for adding and removing phone numbers.
Show answer
Write an async validator that checks whether an email is already registered.
Show answer
Why is Node.js a good fit for the backend in a MEAN application?
Show answer
How do you set up an Express project with TypeScript?
Show answer
What is middleware in Express, and what kinds of middleware are there?
Show answer
How do you design REST endpoints for a resource like orders, including nested data?
Show answer
How do you validate request data in an Express API, and why is it necessary even with Angular validation?
Show answer
What is the difference between PUT and PATCH?
Show answer
Angular calls the Express API on a different port during development and gets CORS errors. What are your options?
Show answer
Write a typed Express route in TypeScript that returns a product by id.
Show answer
Configure an Angular dev server proxy to forward API calls to Express.
Show answer
Tell me about a time you worked closely with a frontend developer to define an API.
Show answer
How does the Node.js event loop affect the way you write Express route handlers?
Show answer
What is the role of a controller-service-repository structure in an Express API?
Show answer
How do you serve an Angular build and an Express API from the same Node server?
Show answer
How do real-time features work in a MEAN application?
Show answer
An Express endpoint generates a large PDF report and the whole API slows down while it runs. How do you fix it?
Show answer
Your API needs to send welcome emails and SMS after signup, but this makes signup slow. What would you change?
Show answer
Your Express API is used by thousands of users and occasionally crashes due to an unhandled promise rejection. How do you make it more resilient?
Show answer
Write a zod validation middleware for an Express route in TypeScript.
Show answer
Serve the built Angular app and the API from one Express server.
Show answer
What is the difference between a monolith and microservices for a Node.js backend?
Show answer
A mobile team and the Angular team both consume your API, and you need to change a response field. How do you avoid breaking clients?
Show answer
How do you design an API endpoint that returns a dashboard summary quickly when the underlying data is large?
Show answer
Write a Socket.IO server event and an Angular service that listens for it.
Show answer
Write a BullMQ queue and worker to send emails in the background.
Show answer
Describe a time you had to optimise a slow backend under pressure.
Show answer
Why is MongoDB a natural fit for a JavaScript stack like MEAN?
Show answer
What are databases, collections and documents in MongoDB?
Show answer
What query and comparison operators do you use most in MongoDB?
Show answer
What is MongoDB Atlas and what features does it offer?
Show answer
OTP codes must automatically expire ten minutes after creation. How would you implement this with MongoDB?
Show answer
Write Mongoose queries to filter, sort, paginate and select fields for a products listing.
Show answer
How do you explain database trade-offs, such as choosing MongoDB over SQL, to a client?
Show answer
How do you use Mongoose with TypeScript?
Show answer
What are Mongoose virtuals, instance methods and statics?
Show answer
What types of indexes does MongoDB support?
Show answer
How does $lookup work in an aggregation pipeline?
Show answer
You are building an e-commerce product catalogue where each category has different attributes, such as size for clothes and RAM for laptops. How would you model it in MongoDB?
Show answer
Users can search products by name, and a regex query has become very slow. What would you do?
Show answer
A list API that uses Mongoose populate on three references has become slow. How would you improve it?
Show answer
Define a typed Mongoose model in TypeScript with an instance method.
Show answer
Write an aggregation that finds the top five customers by total spend with their names.
Show answer
Create a text index and run a relevance-sorted search in MongoDB.
Show answer
Write mongosh commands to inspect a slow query and the indexes on a collection.
Show answer
Tell me about a data modelling decision you made and how it worked out.
Show answer
What schema design patterns are common in MongoDB?
Show answer
What are read concern and write concern in MongoDB?
Show answer
What are change streams in MongoDB and how can a MEAN app use them?
Show answer
Wallet balance updates sometimes produce wrong totals when two purchases happen at the same time. How do you fix this?
Show answer
Your MongoDB collection of sensor readings is growing by millions of documents per day. How would you design for it?
Show answer
Use a MongoDB transaction in Mongoose to place an order and reduce stock together.
Show answer
How does JWT-based authentication work end to end in a MEAN application?
Show answer
Which security measures should every Express API in a MEAN app have?
Show answer
How do you test Express APIs and MongoDB logic in a MEAN project?
Show answer
What are the main steps to deploy a MEAN application to production?
Show answer
Write an Express JWT verification middleware in TypeScript.
Show answer
How does Angular protect against cross-site scripting?
Show answer
What testing tools are used in Angular projects today?
Show answer
What is TestBed and how is it used to test an Angular component?
Show answer
How do you test an Angular service that makes HTTP calls?
Show answer
How do containers and orchestration fit into deploying a MEAN stack?
Show answer
A penetration test report says your API returns other users' invoices when the invoice id is changed. How do you fix it?
Show answer
An npm audit shows several high-severity vulnerabilities in the Express project. How do you handle it?
Show answer
After a new release, a bug affects many users. How do you respond and prevent a repeat?
Show answer
Write a unit test for an Angular component using TestBed.
Show answer
Test an Angular service's HTTP call with HttpTestingController.
Show answer
Write a multi-stage Dockerfile that builds Angular and serves it with Nginx.
Show answer
Write an Nginx server block that serves Angular and proxies /api to Node.
Show answer
Tell me about a time you improved test coverage or quality in a project.
Show answer
Walk me through the MEAN project you are most proud of.
Show answer
What is CSRF and how do Angular and Express handle it?
Show answer
What is Angular SSR and why would you enable it?
Show answer
The security team asks you to move JWTs out of localStorage in the Angular app. What design would you propose?
Show answer
Your Angular unit tests take fifteen minutes in CI and developers stop running them. What would you do?
Show answer
Your MEAN app must handle a festival sale with ten times normal traffic. How do you prepare?
Show answer
Write a GitHub Actions job that tests and builds the Angular app.
Show answer
Frequently asked questions
What jobs can I get after learning the MEAN stack?
You can apply for MEAN Stack Developer, Angular Developer, Node.js Developer, Full Stack Developer and Frontend Engineer roles. Angular is heavily used in enterprise projects run by IT service companies and global capability centres in cities like Bengaluru, Pune, Hyderabad, Chennai, Noida and Gurugram. With experience, MEAN developers move into senior engineer, technical lead and solution architect roles on large business applications.
Who can join a MEAN stack course?
Students of B.Tech, BCA, MCA, B.Sc and diploma programmes, fresh graduates from any stream and working professionals who want to move into development can join. No prior programming experience is strictly required, because the course begins with HTML, CSS, JavaScript and TypeScript before Angular and Node.js. A habit of daily practice and basic logical thinking matter more than your academic background.
How long does it take to learn the MEAN stack and get job-ready?
With two to three hours of focused practice daily, most learners are job-ready in five to six months. Angular has a steeper learning curve than some libraries because of TypeScript, dependency injection and RxJS, so plan time for hands-on practice. Building two or three complete projects, writing tests and practising interview questions regularly are what make you confident in interviews.
Is a certification required to get a MEAN developer job?
A certification is not mandatory, but a course completion certificate helps your resume clear initial screening and shows structured learning. Optional credentials such as the MongoDB Associate Developer certification add credibility. Recruiters mainly judge your projects, GitHub activity, understanding of Angular concepts and live coding ability, so deployed projects with clean TypeScript code and good READMEs are the strongest proof.
Should I choose MEAN or MERN as a fresher?
Both are in demand. MEAN uses Angular, a complete opinionated framework popular in enterprise and IT service projects, which means many openings at large companies with structured teams. MERN uses React, common at startups and product companies. If you like structure, TypeScript and building large business applications, MEAN is a strong choice, and the Node.js, Express and MongoDB skills transfer to both stacks.
Which projects should I build to get hired as a MEAN developer?
Build two or three complete, deployed applications. Good options are a job portal with recruiter and candidate roles, an e-commerce store with cart and admin panel, a hospital or salon appointment system, or a real-time support chat with Socket.IO. Include typed reactive forms, guards, lazy loading, signals, JWT authentication, MongoDB aggregation, unit tests and a CI pipeline, and be ready to explain each design decision.