Suppose I have an HTML structure like this
<ng-template #template1>
<div>
element one
</div>
<div>
element two
</div>
<div>
element three
</div>
</ng-template>
now, Inside this template, I have three elements, How can I access each element when I get the reference of it using TemplateRef. I tried using this
@ViewChild('template1', { static: false, read: TemplateRef }) template: QueryList<ElementRef>
but I am not getting individual elements, How can I achieve this