constructor -
Compnent has a typescript class,So every component must have constructor.The constructor of a component class execute first before any execution of lifecycle hook event.
If you want to inject any dependicies into a component then constructor is best place to inject those dependcies.
ngOnInit-it can be called after constructor execution and before ngDocheck() methods.
This event is mainly used for the initialize data in a component.

