J'ai besoin d'un compteur commençant par 2.
Comment lier [mdDatepicker], [mdDatepickerToggle], #next_payment_ ?
<div formArrayName="next_payment">
<div *ngFor="let payment of productForm.controls.next_payment.controls; let i=index" class="panel panel-default">
<div class="panel-heading">
<span>Payment {{i + 2}}</span>
<span class="glyphicon glyphicon-remove pull-right" *ngIf="productForm.controls.next_payment.controls.length > 1" (click)="removeNextPayment(i)"></span>
</div>
<div class="panel-body" [formGroupName]="i">
<div class="form-group col-md-4">
<md-input-container>
<input mdInput [mdDatepicker]="'next_payment' + i + 2" [ngModel]="npd | date:'yyyy-MM-dd'" (ngModelChange)="npd = $event" placeholder="Date {{i + 2}}" formControlName="next_payment_date_{{i+2}}" id="next_payment_date_{{i+2}}">
<button mdSuffix [mdDatepickerToggle]="'next_payment' + i + 2"></button>
</md-input-container>
<md-datepicker #next_payment_2></md-datepicker>
</div>
</div>
</div>
</div>