36 practice questions with answers for MEAN Stack interviews in Lucknow.
MEAN Stack jobs in Lucknow
Lucknow's tech job market is smaller but growing, led by IT-services delivery centres, government-tech projects and start-ups. Many Lucknow candidates target Noida and Gurgaon roles or remote jobs, so interviews follow the NCR pattern.
Below are 36 questions that match the mix of service, product and domain employers hiring mean stack developers in Lucknow.
Solved for LucknowStart practicing
3 QUESTIONS FREESign up to unlock the full question bank and track your progress.Unlock every question and answer, then continue practising company-wise and package-wise.
✓ 3 questions free • Unlock the rest in seconds
01
How do containers and orchestration fit into deploying a MEAN stack?
Docker packages the Express API and an Nginx image serving the Angular build into portable images with all dependencies. docker compose runs them with MongoDB locally. In production, services like AWS ECS, Azure Container Apps or Kubernetes run multiple replicas, perform rolling updates, restart failed containers and scale on load. Images are built and pushed to a registry by the CI pipeline, tagged by commit.
02
What are standalone components and why are they now the default?
Standalone components declare their own dependencies in an imports array instead of belonging to an NgModule. Since Angular 19 they are the default, and the CLI generates them without NgModules. They reduce boilerplate, make lazy loading simpler with loadComponent, improve tree shaking and make components easier to understand and test. Applications bootstrap with bootstrapApplication and configure providers in app.config.ts.
03
Configure routes with lazy loading, a child route and a wildcard 404 route.
Add a global error interceptor that maps network and 5xx errors to a friendly toast or banner, with retry for transient failures. In each data component, handle loading, error and empty states explicitly, using httpResource status signals or catchError with fallback values. Show a retry button, keep cached data visible if available, and log errors to monitoring. A health check banner helps during outages.
05
What is a ControlValueAccessor and why would you implement one?
ControlValueAccessor is the interface that connects a form control to a UI element. Implementing it, with writeValue, registerOnChange, registerOnTouched and setDisabledState, and providing NG_VALUE_ACCESSOR, lets your custom component, such as a star rating, date picker or phone input, work with formControlName and ngModel like a native input, including validation and touched state. It is essential for reusable form component libraries.
06
Explain the difference between switchMap, mergeMap, concatMap and exhaustMap.
All map each source value to an inner Observable but differ in concurrency. switchMap cancels the previous inner Observable, ideal for search. mergeMap runs all inner Observables in parallel, good for independent uploads. concatMap queues them and runs one at a time in order, good for sequential saves. exhaustMap ignores new values while one is active, ideal for preventing duplicate login or submit clicks.
07
Provide a configuration object through an InjectionToken and use it in a service.
Common patterns include embedding for one-to-few relations, referencing for one-to-many and many-to-many, the subset pattern that embeds only the most recent items, the extended reference pattern that copies frequently needed fields like a customer name into orders, the computed pattern that stores precalculated totals, the bucket pattern that groups time-series readings, and the outlier pattern for rare documents with huge arrays.
10
What are FormControl, FormGroup, FormArray and FormBuilder?
FormControl tracks the value and validation state of a single input. FormGroup groups named controls into an object, such as a registration form. FormArray holds a dynamic list of controls or groups, such as multiple phone numbers or order items. FormBuilder, usually NonNullableFormBuilder, is a helper service that creates these with shorter syntax, for example fb.group({ email: ['', Validators.required] }).
11
Write mongosh commands to inspect a slow query and the indexes on a collection.
Handle them at two levels. A global error interceptor catches HttpErrorResponse, redirects to login on 401, shows a toast for 500 errors and logs details. Component or service code uses catchError to provide fallbacks or show specific messages, such as field errors from a 422 response. Use retry with a delay for transient network failures, and never leave errors unhandled so the UI shows a blank state.
13
An Express endpoint generates a large PDF report and the whole API slows down while it runs. How do you fix it?
PDF generation is CPU-heavy and blocks the event loop. Move it to a background job: the endpoint creates a job in a queue such as BullMQ with Redis and immediately returns 202 Accepted with a job id. A separate worker generates the PDF, uploads it to storage and updates the job status. Angular polls the status or receives a websocket notification, then downloads the file.
14
Write a cart service using signals with computed totals.
Add a canDeactivate guard on the form route. The guard checks whether the form is dirty and unsaved through a method or signal on the component, and if so asks the user to confirm leaving with a dialog. Return true to allow or false to stay. Also handle browser refresh and tab close with a beforeunload listener, and consider auto-saving drafts to local storage or the server.
Zoneless mode removes the dependency on Zone.js. Instead of patching browser APIs to guess when something changed, Angular schedules change detection when signals used in templates update, events fire in templates, or markForCheck is called. It is stable in recent Angular versions and the default for new projects. Benefits include a smaller bundle, better performance, clearer stack traces and fewer unnecessary checks.
17
After a new release, a bug affects many users. How do you respond and prevent a repeat?
First limit the impact: roll back to the previous version or disable the feature with a flag, and communicate status to support. Then reproduce the bug, fix it with a test that covers the case, and redeploy through the normal pipeline. Afterwards, run a blameless post-mortem to find gaps, such as missing tests, review or monitoring, and add the actions to the backlog.
18
What are directives in Angular and what types exist?
Directives add behaviour to elements. Components are directives with templates. Attribute directives change appearance or behaviour of an existing element, such as ngClass, ngStyle or a custom appHighlight using host bindings. Structural directives change the DOM layout by adding or removing elements, like the older *ngIf and *ngFor, now largely replaced by built-in control flow. Custom directives keep repeated DOM logic out of components.
19
Which security measures should every Express API in a MEAN app have?
Use HTTPS, helmet for security headers, a strict CORS allowlist, input validation on every route, rate limiting on auth endpoints, body size limits, parameterised queries and stripped MongoDB operators, bcrypt for passwords, secrets in environment variables, and least-privilege database users. Keep dependencies updated with npm audit or Dependabot, log security events and never return stack traces in production.
20
How do you approach learning a new framework version or language feature on the job?
Situation: our team decided to adopt Angular signals in new features. Task: I had to use them in a sprint while still delivering. Action: I read the official guide, built a small sample, compared it with our RxJS patterns, then implemented one component and asked a senior to review. I shared a short note with examples for the team. Result: my component became the reference pattern for later features.
21
What are Angular's lifecycle hooks and when is each typically used?
ngOnChanges runs when input values change. ngOnInit runs once after the first inputs are set, used for initial data loading. ngDoCheck allows custom change detection. ngAfterContentInit and ngAfterViewInit run after projected content and the view are ready, used for DOM access. ngOnDestroy runs before removal, used for cleanup. With signals, effect, computed and DestroyRef often replace several of these hooks.
22
What are discriminated unions and why are they useful?
A discriminated union is a union of object types that share a literal property, the tag, such as type Result = { status: 'ok'; data: User } | { status: 'error'; message: string }. Checking result.status narrows the type, so TypeScript knows which fields exist in each branch. Combined with a never check in the default case, the compiler warns you when a new variant is added but not handled.
23
Tell me about a time you improved test coverage or quality in a project.
Situation: our MEAN project had almost no tests and every release broke something. Task: I volunteered to improve this. Action: I set up Supertest with an in-memory MongoDB for critical APIs, added component tests for checkout, wrote a short testing guide and made tests required in CI. I started with the five most bug-prone areas. Result: production bugs per release dropped sharply within three months.
24
How do built-in and custom validators work in reactive forms?
Validators are functions that take a control and return null when valid or an error object like { required: true } when invalid. Built-ins include Validators.required, email, minLength, maxLength, pattern, min and max. A custom validator follows the same ValidatorFn signature, for example rejecting weak passwords. Group-level validators can compare fields, such as password and confirm password. Errors are read through control.errors and control.hasError.
25
Tell me about a time you worked closely with a frontend developer to define an API.
Situation: our Angular developer and I were starting a new invoices module. Task: agree on the API before coding in parallel. Action: I drafted an OpenAPI spec with sample responses, we reviewed it together, adjusted field names and pagination to match the screens, and I provided a mock server so she could start immediately. Result: integration took one day instead of a week and we had almost no rework.
26
Write an aggregation that finds the top five customers by total spend with their names.
Build in Node, ship only static files.
FROM node:22-alpine AS build
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npx ng build --configuration production
FROM nginx:alpine
COPY nginx.conf /etc/nginx/conf.d/default.conf
COPY --from=build /app/dist/shop/browser /usr/share/nginx/html
EXPOSE 80
The final image contains no Node.js or source code. nginx.conf should include try_files $uri /index.html for Angular routes.
28
After deploying the Angular app behind a load balancer, navigating directly to /orders/42 gives a 404. What is wrong?
The Angular router handles that path in the browser, but the web server looks for a real file at /orders/42 and finds none. Configure the server to return index.html for unknown routes: try_files $uri $uri/ /index.html in Nginx, a rewrite rule in IIS or static hosting, or a catch-all route in Express that serves the built index.html after API routes. Alternatively use server-side rendering.
29
Walk me through the MEAN project you are most proud of.
Situation: for my final-year project I built a hospital appointment system. Task: let patients book slots and doctors manage schedules. Action: I designed MongoDB collections with indexes for slots, built a TypeScript Express API with JWT and role checks, and an Angular frontend with reactive forms, guards and signals. I added tests and deployed with Docker on a cloud VM. Result: our college clinic used it for a semester.
30
How does lazy loading work with the Angular router?
Lazy loading defers downloading a feature's code until the user navigates to it. Use loadComponent: () => import('./admin/admin.component').then(m => m.AdminComponent) for a single component, or loadChildren to load a file of child routes. The CLI builds a separate chunk for each lazy route. You can add preloading strategies like withPreloading(PreloadAllModules) to fetch lazy chunks in the background after startup.
31
Test an Angular service's HTTP call with HttpTestingController.
Use a FormArray of FormGroups, each with product, quantity and price controls and validators like min(1). Provide addItem and removeItem methods that push or removeAt on the array, and render rows with @for over items.controls. Calculate the total from valueChanges or a computed signal. On submit, send getRawValue() typed as the order DTO, and disable the submit button while invalid or pending.
33
What testing tools are used in Angular projects today?
Angular's CLI has moved to Vitest as the default unit test runner for new projects, replacing the deprecated Karma, while many existing projects still run Karma with Jasmine or have switched to Jest. TestBed configures components and services for tests, HttpTestingController mocks HTTP calls, and component harnesses from the CDK simplify interaction tests. Playwright or Cypress handle end-to-end tests.
34
Write a standalone Angular component that displays a list of products using @for.
Create a root-provided FilterService holding the city in a signal, with methods to update it, and inject the service into both components so they share the same instance. For persistence across reloads or shareable links, sync the value to a query parameter or local storage. If many features need shared state with complex updates, consider NgRx SignalStore or NgRx Store.
36
Write a custom validator that rejects passwords without a number and an uppercase letter.
Which companies hire MEAN Stack professionals in Lucknow?
Companies with large offices in Lucknow include HCLTech. Use their company pages below to practise employer-specific sets.
Are MEAN Stack interviews in Lucknow different from other cities?
The questions depend more on the company than the city. Lucknow's mix of employers decides the style: Many Lucknow candidates target Noida and Gurgaon roles or remote jobs, so interviews follow the NCR pattern
How do I find MEAN Stack jobs in Lucknow?
Shortlist companies with Lucknow offices, keep your CV focused on MEAN Stack projects, apply on company career pages and job portals with the Lucknow filter, and practise the questions on this page before each interview.