<div *ngFor="let task of arrayList">
<input id="task.fieldName" *ngIf="task.key === 'Others'" type="text" class="form-control">
</div>
When dealing with dynamically created input fields based on a condition, the challenge is accessing their values in the typescript file. One way to access an input field by name is using @ViewChild. However, I am curious if there are alternative methods to retrieve the value of dynamically created elements.