Recently, I was trying to prepare myself for the upcoming interviews and it was a bit tough to search in google and open link and see same questions each and every time so I thought of sharing what I have found and what is most common questions someone should know if they are preparing for an interview.

Below are the most common interview questions asked in Latest Angular Developer Interviews. These Angular Interview questions and answers help to prepare for Angular developer interviews from junior to senior levels. Moreover, this article covers the basics to advance angular interview questions which you must prepare in 2021.

Let’s Start with Some basic questions

1. What is the difference between constructor and ngOnInit?

One of the common question which popups in interviewers mind is what is the difference between constructor and ngOnInit? We mostly go with the answer that we do write the dependencies in the constructors while we write logics in the ngOninit.

Sometimes the interviewer will check what else we know about it? why we cannot put the services or logics in constructors?

The simple answer is sometimes we need to wait until all dependencies get loaded or for parent/child components we might need to wait until the component is loaded that’s why it’s preferable to write the logic in ngOnInit.

Let’s check other differences.

Image for post

#interview #typescript #javascript #angular

Advanced Angular Interview Questions You Must Prepare In 2021
11.70 GEEK