Skip to content

Commit

Permalink
docs(forms): use a number as input value for formControlName (angular…
Browse files Browse the repository at this point in the history
…#30606)

PR angular#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 angular#30606
  • Loading branch information
cexbrayat authored and kara committed Aug 9, 2019
1 parent a647298 commit bed680c
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -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>
Expand Down

0 comments on commit bed680c

Please sign in to comment.