December 2017
Beginner
372 pages
10h 32m
English
As the name suggests, onInit is called when Angular initializes the component and displays the data-bound properties. This event is the recommended place to perform any specific initialization that needs to be performed for the component and to set any input properties on the component.
So, if you want to make a service call anytime to fetch the initial set of data, or perform some complex calculations required for the component display, this is the event to use.
Read now
Unlock full access