I have an input text inside an ngFor and I would like to define a dynamic local variable that would have a unique id value for each input, so I can perform the .focus () of this input, but I do not know how to do this , I have tried in many ways and I did not succeed.
I would like to set the idEmail of each email as my local variable To be able to access it with my @ViewChild
<tr *ngFor="let email of Emails">
<td *ngIf="!isUpdating(email.idEmail)">
{{ email.enderecoEmail }}
</td>
<td *ngIf="isUpdating(email.idEmail)">
<input [(ngModel)]="txtEmail" #email.idEmail type="text" class="form-control">
</td>
</tr>
Please help me I'm stuck on this task 2 days and I do not find the solution