Explain ngOnInit () function

bookmark

ngOnInit () function is a lifecycle hook which is called after completion of data-bound properties of the directive.