Persistent Angular Interview Questions for 5+ years
Shared question set for 5+ years of experience. Topics and wording follow the supplied notes; these are questions, not official company guidance.
- You fetched user data in one component, but another component also needs it. How will you avoid calling the API again?
- A user submits a form (Create User). How will you send data to the API, update the UI after success, show a success/error message, and will you store the response in state or not?
- After login, where will you store the JWT token: LocalStorage or NgRx Store?
- How will you restore the token after a page refresh?
- You are managing a large list (1000+ items). Why would you use NgRx Entity? What problem does it solve?
- You have an API for update user. How many actions will you create and why?
- Why do we use selectors instead of directly accessing state?
- Have you created any custom directive in your project? Explain it.
- You want to call multiple APIs based on previous API responses. How will you handle this, and where will you write this logic: service file or effects file?
- Have you worked on lazy loading? Explain it and write code for it.
- Explain the change detection cycle.
- Explain lifecycle hooks.
- How do you implement routing? Write code for it.
- How do you test your application?
- You created a form using Reactive Forms. How do you implement validations? How will you apply custom validation? Which built-in validations have you used?
- How do you deploy your code?
- Which Agile methodologies do you follow? (They also asked about daily stand-ups, code review before PR merge, sprint demos, client feedback and retrospectives.)
- Explain the use of object destructuring and the spread operator.
- How do you achieve a deep copy?
- Are you aware of the new features from Angular 17+? Write a Signal and change its value on a button click.