I have a parent class and child class in Angular. When trying to create a constructor inside child class it throws some error:
Constructors for derived classes must contain a 'super' call.
It will be working if the code is added in ngOnInit
instead of constructor
. So what is the difference between these two? Both will be invoked up on instantiating the class.