What is the possible order of life-cycle hooks?



What is the possible order of life-cycle hooks?..

Answer / Ajay Kumar Pal

The possible order of AngularJS component life-cycle hooks is: 1. constructor - Initializes the component's properties before any data-binding has occurred. 2. $postLink - Triggered after the template has been linked to the DOM, allowing access to elements in the DOM. 3. $onInit - Called once when the component has been initialized and its properties are available.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More AngularJS Interview Questions

Explain property binding or one way binding in angular js?

1 Answers  


What is directives?

1 Answers  


How to use $routeparams in generating the templateurl?

1 Answers  


What is the use of ngfortrackby directive?

1 Answers  


What is new in Angular 8?

1 Answers  


Is .value() the proper way to set app-wide constant and how to retrieve it in a controller?

1 Answers  


What is scope in javascript?

1 Answers  


How to define multiple restrict options on a directive in angularjs?

1 Answers  


What is the best way to declare and access a global variable in angular 2?

1 Answers  


Who is the author of angular js?

1 Answers  


What are the differences angular modules, javascript modules vs. Angular 1 modules?

1 Answers  


Differentiate between dom and bom.

1 Answers  


Categories