adspace
What are differences between constructors and oninit?
Answer Posted / Ankur Agarwal
The main difference between a constructor and $onInit in AngularJS is that the constructor initializes the component's properties before any data-binding has occurred, while $onInit gets called once when the component has been initialized and its properties are available.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
How can primeng be used with angular2?
Give the example of angularjs strings?
How an object or function can get a hold of its dependencies?
Angularjs dependency injection of value inside of the module.config?
What is a dynamic route in angularjs and how do you implement it?
How to get and log an error in angular 4?
How to implement a datagrid table with angular 2 and primeng?
How to create angularjs filter which outputs html?
What is the latest version of angular?
What is the latest angular?
How to use primeng in angular 4?
Which version you are using js?
How to enable html5 mode in angular 1.x?