从组件访问ngfor第一个元素

时间:2018-07-25 14:31:03

标签: angular typescript redux observable ngrx

我需要从组件中获取ngfor的第一个元素,以获取其偏移值。

到目前为止,我唯一发现的是在模板中使用let first = first;并没有帮助

我引用了我的列表,但我不知道该如何使用它:

@ViewChild('list') list: ElementRef;

我该怎么做?

0 个答案:

没有答案
相关问题