When will ngoninit be called?



When will ngoninit be called?..

Answer / Sandeep Rajput

ngOnInit is called immediately after the constructor in AngularJS components. It is called only once during the component's lifecycle, just before Angular initializes data for the first time.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More AngularJS Interview Questions

Can we set an angular variable from php session variable without sending an http request?

1 Answers  


What's new in angular 4?

1 Answers  


What is Dependency Injection in Angular 4?

1 Answers  


How does oauth 2.0 work?

1 Answers  


When do I add components to entrycomponents?

1 Answers  


How to use the css binding in angular js?

1 Answers  


How to debug the $rootscope object of angularjs when in the browser?

1 Answers  


What is dependency injection in angularjs and how does it work?

1 Answers  


What is the purpose of a route guard?

1 Answers  


What are the web application security risks that a web developer should avoid while doing development using angularjs?

1 Answers  


What are services in angular 2?

1 Answers  


If you were to migrate from angular 1.4 to angular 1.5, what is the main thing that would need refactoring?

1 Answers  


Categories