【发布时间】:2017-09-07 23:35:05
【问题描述】:
我有以下子组件,它是继承父组件:
@Component({
template: `<p>child</p>`
})
export class EditChildComponent extends EditViewComponent{
constructor(){
super();
}
}
@Component({
template: `<p>parent</p>`
})
export class EditViewComponent{
constructor(){
}
}
现在有什么方法可以将 EditViewComponent 的模板放在 ChildComponents 模板中,就像在嵌套组件中使用 ng-content 一样?我将如何得到以下结果:
<p>parent</p>
<p>child</p>
【问题讨论】:
-
有答案了吗?
标签: angular