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 |
What is an angular 2 component?
Is angular 7 stable version?
Explain what is Angular Expression?
How to access parent scope from child controller in angularjs?
How to validate password and confirm password in angular 4?
What’s new in angular 4? And what are the improvements in angular 4?
What is the difference between a provider, a service and a factory in angular?
What does injectable mean?
How do you define transition between two states in angular?
What is difference between $interval and window. setInterval in AngularJS?
Explain what is scope in angularjs?
What is primeng in angular?