Learning Partner

Cognizant Angular Interview Questions for 6+ years

Shared question set for 6+ years of experience, L2 round. Topics and wording follow the supplied notes; these are questions, not official company guidance.

  1. Explain memory allocation in JavaScript. Sub-question: how do you clear closure memory?
  2. List the ES6 features used in your project. Sub-questions: where have you used destructuring and how often do you use Promises in Angular?
  3. What is your understanding of modules in JavaScript?
  4. Have you created any pure functions? Explain with a use case.
  5. Have you created any recursive function? Explain it.
  6. Users log in, but even if the user closes the tab and opens it again we want to keep them logged in. How do you achieve this?
  7. If the same dashboard data is available from multiple APIs, how would you call all APIs in JavaScript and use the response from whichever API returns first?
  8. Some users have very slow internet connections, so form submission APIs may take 6-8 seconds to respond, and users click the submit button multiple times causing duplicate records. How would you prevent this using JavaScript fundamentals?
  9. A page has a table with search filters (from date, to date, category, price range) and a search button; each row has an Open button that navigates to a details page. When the user returns, the previously selected filters and the same table data should still be visible. How would you implement this?
  10. What is the difference between setValue and patchValue?
  11. List the reusable components you have created.
  12. How will you create a reusable textbox that supports ngModel and FormControl?
  13. What is tree shaking in Angular?
  14. Explain the RxJS operators tap, race and map (asked with code explanation).
  15. The logout button is in the navbar but user activity is in the dashboard. How will you send that data in the logout API?
  16. Dynamic menu based on roles: one route is accessible by multiple roles; how do you use guards for role-based access?
  17. Your project uses PrimeNG but needs migration to Angular Material. How will you plan and manage branching without affecting sprints?
  18. How comfortable are you with external libraries like AG Grid, PrimeNG and graph libraries?

Browse Angular question sets