I am using *ngFor to create a bunch of divs. I would like to get my hands on one of them an get its width.
.html
<div #elReference *ngFor="let el of elements> HEHE </div>
.ts
@ViewChild("elReference") elReference: ElementRef;
Apparently, you cannot use ViewChild with *ngFor, because elReference
remains undefined.
How do you get element reference created with *ngFor?