Angular Component Life cycle Hooks

Earlier in angular 1, we had using (ng-init), (ng-change) directives to access page initialization, change event of controller. This feature will expand in angular 2 and come up as lifecycle hooks with different phases.

So first we will know what are a Lifecycle hooks?
Lifecycle hooks are simply sequentially functions that called for specific phase of component’s life in our angular apps.

According to angular documentations lifecycle hooks are:
Angular creates it, renders it, creates and renders its children, checks it when its data-bound properties change, and destroys it before removing it from the DOM. Continue reading “Angular Component Life cycle Hooks”