ElementRef、Renderer2、viewChild、AfterViewInit

xiaoxiao2021-02-28  128

1.https://segmentfault.com/a/1190000008653690;

ElementRef:封装不同平台下视图层中的 native 元素 (在浏览器环境中,native 元素通常是指 DOM 元素),最后借助于 Angular 提供的强大的依赖注入特性,我们就可以轻松地访问到 native 元素。——找元素的时候使用。

转载请注明原文地址: https://www.6miu.com/read-31808.html

最新回复(0)