What are the lifecycle hooks for components and directives?



What are the lifecycle hooks for components and directives?..

Answer / Harendra Pal Singh Chauhan

Lifecycle hooks in AngularJS allow developers to hook into various stages of a component or directive's life cycle. Some common lifecycle hooks include $onInit, $onChanges, $doCheck, $onDestroy, ngOnInit, ngAfterContentInit, ngAfterContentChecked, ngAfterViewInit, ngAfterViewChecked, and ngOnDestroy.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More AngularJS Interview Questions

Explain the ng-model directive in angularjs.

1 Answers  


What is a singleton pattern?

1 Answers  


How to create and use a custom pipes?

1 Answers  


Explain ng-include directive in angularjs?

1 Answers  


What is strict mode in js?

1 Answers  


What is an isolated scope?

1 Answers  


How to use angular datepicker in angular 5/4 applications?

1 Answers  


List some new features comes with angular6

1 Answers  


What is the difference between directives and services?

1 Answers  


What Is The Difference Between One-Way Binding And Two-Way Binding?

1 Answers  


What is a pure pipe?

1 Answers  


Why you will do ngondestroy after subscrib?

1 Answers  


Categories