Nagarro Angular Interview Questions for 5-7 years
Shared question set for 5-7 years of experience, First round. Topics and wording follow the supplied notes; these are questions, not official company guidance.
- Explain prototype in JavaScript.
- What are polyfills and explain a real-time use case.
- What is the difference between shallow copy and deep copy? What are the various ways to achieve a deep copy?
- What is the difference between spread and rest operators? Explain object destructuring.
- What are callbacks and pure functions?
- What is the role of angular.json?
- What is JIT and AOT? What is the difference between them?
- How can a singleton service be shared only among a few components?
- What is the difference between @ViewChild and @ContentChild?
- What is change detection?
- What is the difference between Promise and Observable?
- How do you add dynamic fields in Reactive Forms?
- In Angular routing, when navigating from Com1 to Com2, how can we prevent the Back button from returning to Com1?
- Demonstrate role-based routing (pseudo code in notepad).
- Demonstrate how an Observable works (pseudo code in notepad).
- How does virtual scroll improve performance?
- How do you optimize Angular application performance?
- What is deferred loading?
- What are dumb and smart components?
- How can we use Signals for state management?
- Predict the output of a snippet with console.log("Start"), setTimeout(0), Promise.resolve().then and console.log("End").
- Predict the output of an async function that logs 1, awaits a Promise.then, then schedules a setTimeout and logs 2.
- Predict the output of: "test".includes(""), "abc".includes(""), "".includes(""), [] == false, [] === false.