I know this is an old question but I cant find a simple answer and it seems so strange.
I have a father component with its own html and several component that extends this one.
I need something like this:
Father's HTML template
<p class="father"> somethings </p>
<child-component></child-component> <-- some kind of angular tag
class ChildComponent extends FatherComponent
<p> Im a Child </p>
Result rendering Child
<p class="father"> somethings </p>
<p> Im a Child </p>
Is this so hard to get?
UPDATE AS ASKED
@Component({
selector: 'BaseComponent',
templateUrl: 'BaseComponent.html',
})
export class BaseComponent implements OnInit
{
...
}
@Component({
selector : 'ChildBaseComponent ',
templateUrl : 'ChildBaseComponent .html',
})
export class ChildBaseComponent extends BaseComponent
{
....
}