docs(forms): use a number as input value for formControlName (#30606)

PR #29473 changed the docs to use a string as the input value of `formControlName`, as it used to only accept a string.
This has been changed, and `formControlName` now accepts a string or a number, so the example in the docs can use a binding as they used to.

PR Close #30606
This commit is contained in:
cexbrayat 2019-05-22 10:44:28 +02:00 committed by Kara Erickson
parent a647298412
commit bed680cff8
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>