Is it possible to extend a component in Angular 2 and still use the inputs and outputs in the parent?
export class Book { @Input() name; } export class EBook extends Book { @Input() downloadUrl; @Input() size; }
When I try to extend a component, everything inside the class works, except for code that needs attributes / decorators like inputs and outputs. I made a plunker that illustrates the problem: http://plnkr.co/edit/cfTKgScbaXMmEMEMOGY0zr
A book is a basic component with a single I / O name.
EBook inherits the book and adds input / output DownloadUrl, Size.
As you can see in the plunker, EBook does not receive a name, because the input is defined in the book and not in EBook
Abris source share