on-internet
← Community

Template inheritance in Angular

Stack Overflow ·

I have the following child component and its inheritance parent component: @Component({ template: `<p>child</p>` }) export class EditChildComponent extends EditViewComponent{ constructor(){ super(); } } @Component({ template: `<p>parent</p>` }) export class EditViewComponent{ constructor(){ } } Now is there any way to place the template of the EditViewComponent in the ChildComponents template like you would do with ng-content in nested components? How would I get the following result: <p>parent</p> <p>child</p>

Comments

Sign in or sign up to comment and upvote.

No comments yet.