【发布时间】:2019-03-15 03:52:51
【问题描述】:
我想从父组件到子组件查看Child。
class ParentComponent {
@ViewChild('CommentSection') commentBox: ElementRef
}
class ChildComponent {}
child.component.html
<textarea #CommentSection>
</textarea>
有可能吗?
我在 afterviewInit 函数中得到“未定义”
【问题讨论】:
-
请在 stackblitz 上创建minimal reproducible example。