Angular Interview Questions

Angular Interview Questions

 Lifecycle Hooks:

Q1. What is the sequence of component lifecycle hooks?

Q2. If there is a nested component like the parent and child component then what will be the order of lifecycle hooks?

Q3. What is the difference between ngDoCheck() and ngOnChanges()?

Q4. Which of the lifecycle method called when the input properties changes.

Q5. Which of the lifecycle method called after the child views are initialized.

Q6.  What are the lifecycle methods called only once in the lifecycle?

Q7. Can we access the Dom element inside the Constructor?

 Component:

Q1. What is the difference between the providers section present in the component and present in app.module.ts file?

Q2. How do you reference a child component inside a parent component?

Q3. What is the difference between @ViewChild and @ViewChildren?

Q4. What is the difference between @ContentChild and @ContentChildren?

 Data Binding:

Q1. What is two-way binding? Give an example.

Q2. What is the role of ngModel?

Q3. What is template reference variable and how to declare it?

 Pipe:

Q1. What is Pipes and How many types of Pipes support by Angular?

Q2. Can I create a custom pipe in Angular?

Q3. What is an AsyncPipe in Angular?

Q4. What is the difference between Pure and impure Pipe?

 Routes:

Q1.  How to import routes in the root module?

Q2. How to add children routes in the application?

Q3. Difference between RouterModule.forRoot and RouterModule.forChild?

 Modules:

Q1. How to create a new module & How to import a new module to the root module?

Q2. How do make the components of the module to make it available to the root module?

 Services:

Q1. What are the different HTTP Verbs supported by Angular?

Q2. What is the difference between Patch() and Put() verb?

Q3. If we have just imported the service in the app.module.ts and then using the service into the component, it will give an error or run successfully.

Q4. How many services we can add into Providers section?


Comments

Popular posts from this blog

iframe vs embed vs object in HTML 5

Constructor in c#

What is the need of method overriding ???