私は角度2を使用していますが、各行のコントロールを個別に検証したいと思います。しかし、私はそれをする方法を得ていません。私はそれが反応型のみを使用し、テンプレート駆動型のアプローチを使用しないで行うことを望みます。それぞれの「tr」に[formGroup]が必要です。どんな助けもありがとう。以下は私のコードの構造です:各テーブル行の反応形式
<tbody [ngClass]="{'alternate-row-color': $even}" *ngFor="let single of allTeamDetails">
<tr>
<td class="td-data first-column">
<input type="text" class="input-text form-control" [value]="single.first_name">
</td>
<td class="td-data second-column">
<input type="text" class="input-text form-control" [value]="single.last_name">
</td>
<td class="td-data third-column">
<input type="email" class="input-text form-control" [value]="single.email">
</td>
<td class="td-data fourth-column">
<select class="selection-dropdown width-80-percent" [value]="single.user_role">
<option *ngFor="let singleRole of allUserRole" value="{{singleRole.name}}">{{setUserRoleAndType(singleRole.name)}}</option>
</select>
</td>
<td class="td-data fifth-column" >
<input type="password" class="input-text form-control" >
</td>
<td class="td-data sixth-column" >
<input type="password" class="input-text form-control" >
</td>
<td class="td-data save-send-tm-data">
<button class="btn save-user-details save-sub-account-details" type="button" data-toggle="tooltip" title="Save"><i class="fa fa-floppy-o" aria-hidden="true"></i></button>
</td>
<td class="td-data save-send-tm-data">
<button class="btn save-user-details save-sub-account-details" (click)="openSendMessageModal(single.email)" type="button" data-toggle="tooltip" title="Send Message"><i class="fa fa-envelope" aria-hidden="true"></i></button>
</td>
<tr>
</tbody>
どれソリューションを:)だけのために、plnkrを作成しました。私は 'ngForm'動的テンプレート参照変数に割り当てることを試みていたが、テンプレート参照変数が静的であることが分かった。 – GeniusGo