docs(forms): properly convert number to string for formControlName input (#29473)

PR Close #29473
This commit is contained in:
Piotr Tomiak 2019-03-22 14:56:06 +01:00 committed by Alex Rickabaugh
parent d750b1e10d
commit de996c6d56
1 changed files with 1 additions and 1 deletions

View File

@ -17,7 +17,7 @@ import {FormArray, FormControl, FormGroup} from '@angular/forms';
<form [formGroup]="form" (ngSubmit)="onSubmit()">
<div formArrayName="cities">
<div *ngFor="let city of cities.controls; index as i">
<input [formControlName]="i" placeholder="City">
<input formControlName="{{i}}" placeholder="City">
</div>
</div>
<button>Submit</button>