The main difference between constructor and ngOnInit is that ngOnInit is lifecycle hook and runs after constructor. Component interpolated template and input initial values aren’t available in constructor, but they are available in ngOnInit . The practical difference is how ngOnInit affects how the code is structured
Refwe links
https://stackoverflow.com/questions/35763730/difference-between-constructor-and-ngoninit