Skip to content

Commit

Permalink
Breaking change: prepend the parent path to the addMethods in the For…
Browse files Browse the repository at this point in the history
…mServices when using a FormArray

For example:
Given this structure:
data:
    contact:
        phones: []

- 1.*: addPhone()
- 2.*: addDataContactPhones()
  • Loading branch information
Jose Carlos committed Jun 7, 2019
1 parent b32e177 commit f208355
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions demo/petstore/src/app/app.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@ <h1>Create a new Pet</h1>
</select><br/>
<p>
Tags:
<button (click)="petCreateFS.addTags()">Add new tag</button>
<button (click)="petCreateFS.addBodyTags()">Add new tag</button>
</p>
<ul>
<li *ngFor="let tag of petCreateFS.form.controls['body']['controls']['tags']['controls']; let i = index"
[formGroup]="tag">
<input type="text" formControlName="id" placeholder="Tag ID">
<input type="text" formControlName="name" placeholder="Tag Name">
<button (click)="petCreateFS.removeTags(i)">Remove tag</button>
<button (click)="petCreateFS.removeBodyTags(i)">Remove tag</button>
</li>
</ul>
<button (click)="savePet()">Save</button>
Expand Down

0 comments on commit f208355

Please sign in to comment.