Angular 反应形式显示

Angular reactive form display

我正在尝试做一个反应形式,但我在视觉部分遇到了一些问题^^

这是我的 html :

<form class="text-center" [formGroup]="requeteModif" (ngSubmit)="modifier()" *ngIf="tableSelect != null">
  <h5>Ajouter des informations</h5>
  <div class="row">
    <div class="col" *ngFor="let modification of modif.controls; let nomCol of nomColonne; let j=index" formArrayName="modif">
      <label class="text-center">
        {{nomCol}}
      </label>
      <div *ngFor="let infoTable of infoTable; let i = index;">
        <input type="text" class="form-control" [formControlName]="i">
      </div>
      <div><button class="btn btn-primary" type="submit">Modifier</button></div>
    </div>
  </div>
</form>

我想要什么:

           Col1                    Col2  
           true                      A            Button (get true, A)
           false                     B            Button

[编辑] 我找到了一种以我想要的方式显示它的方法,但我不知道如何安排我的代码,因为我想使用变量..

<div *ngFor="let infoTable of infoTable; let i = index;">
    <input *ngIf="j==0" type="text" class="form-control" [formControlName]="i">
    <input *ngIf="j==1" type="text" class="form-control" [formControlName]="i+5">

</div>

j id 列数,如您所见,它取决于列数,使用这种方式太静态了,但我不知道如何修复它...

对不起我的英语 谢谢!

我找到了答案,我刚刚使用了 data_binding 但我不知道它是如何工作的 ^^' [ngModel]