Having a ElementRef(QueryList) of a group of dynamically created Table cells (td html elements) using ViewChildren, I have successfully debugged and verified the availability of the element set.
When clicking on a specific td html element, a function is called where I need to determine which element in ElementRef(QueryList) was clicked. How can this be achieved?
component.html
<table>
<tr *ngFor="let i of Arr">
<ng-container *ngFor="let j of Arr">
<td #tdID (click)="cellClicked(tdID)">
</td>
</ng-container>
</tr>
</table>
component.ts
Arr =[1,2,3];
@ViewChildren('tdID') divs:QueryList<ElementRef>;
cellClicked(cell) {
console.log("Cell clicked"+cell);
//Need assistance finding which element in the divs QueryList matches "cell"
}