DEV Community

Discussion on: Component Inheritance in Angular

Collapse
 
pix303 profile image
Paolo Carraro • Edited

I'm try now and as far i can see (with my surprise...) super.ngOnInit() is not necessary. Both concrete and base component run the method. Base class implements OnInit, concrete one extends only. Maybe because of ngOnInit is async?

Collapse
 
pix303 profile image
Paolo Carraro

I confirm: async makes onNgInit run anyway for base and concrete class.