I'm trying to Iterate my row depending on what the user input. for ex, the user input 2 value and will return the same value of rows. and how to insert it inside in FormArray
setCount(count:any){
console.log(count);
this.count = count;
this.countArray = Array(parseInt(count)).fill(0).map((x,i)=>i);
}
<mat-form-field class="full-width">
<mat-label>Qty</mat-label>
<input matInput type="number" formControlName="qty" value="0" (click)="setCount($event.target.value)">
</mat-form-field>
<tr *ngFor="let Array of Array.controls; let i = index;" [formGroupName]="i">
<td>
</td>
<td>
<input type="text" formCOntrol="Number" class="form-control" style="width:700px">
</td>
</tr>
Here is my example