繁体   English   中英

如何在另一个组件中引用 html 中的元素? 我猜@ViewChild 在同一个组件中工作

[英]How to get reference to an element in html in another component? I guess @ViewChild works in same component

设想:

parent.html 有 child1.html 和 child2.html

child1.html 有一个 div。

child2.ts 想要访问这个 div 并检查它的长度

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM