Explain component specific hooks?



Explain component specific hooks?..

Answer / Devendra Kumar Yadav

Component-specific hooks in Angular are methods that allow you to perform actions at specific points during the lifecycle of a component. There are five lifecycle hooks:n
1. ngOnChanges: This hook is called when the input properties of a component change.
2. ngOnInit: This hook is called immediately after the component's inputs have been initialized and its initial properties have been set.
3. ngDoCheck: This hook is called every time Angular checks whether a component needs to be re-rendered.
4. ngAfterContentInit: This hook is called when the component's content projection has been initialized.
5. ngAfterViewInit: This hook is called after the component's view (i.e., its template and its child components) has been initialized.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More AngularJS Interview Questions

What is an angular 2 component?

1 Answers  


Is angular 7 stable version?

1 Answers  


Explain what is Angular Expression?

1 Answers  


How to access parent scope from child controller in angularjs?

1 Answers  


How to validate password and confirm password in angular 4?

1 Answers  


What’s new in angular 4? And what are the improvements in angular 4?

1 Answers  


What is the difference between a provider, a service and a factory in angular?

1 Answers  


What does injectable mean?

1 Answers  


How do you define transition between two states in angular?

1 Answers  


What is difference between $interval and window. setInterval in AngularJS?

1 Answers  


Explain what is scope in angularjs?

1 Answers  


What is primeng in angular?

1 Answers  


Categories