0
I have an input text inside an ngFor and would like to define a dynamic local variable that has a unique id value for each input, so that I can perform the . Focus() of this input, but I don’t know how to accomplish it, I’ve tried it in several ways and I haven’t succeeded.
I would like to set the idEmail of each email as my local variable In order 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’ve been stuck in this task for 2 days and I can’t find the solution