mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
docs: add button type in form array example (#43666)
add a button type in the example of creating a dynamic form so that the button that adds the alias control does not submit the entire form PR Close #43666
This commit is contained in:
parent
7aea5256de
commit
7cd87ea4c4
1 changed files with 1 additions and 1 deletions
|
|
@ -27,7 +27,7 @@
|
|||
<!-- #docregion formarrayname -->
|
||||
<div formArrayName="aliases">
|
||||
<h2>Aliases</h2>
|
||||
<button (click)="addAlias()">+ Add another alias</button>
|
||||
<button (click)="addAlias()" type="button">+ Add another alias</button>
|
||||
|
||||
<div *ngFor="let alias of aliases.controls; let i=index">
|
||||
<!-- The repeated alias template -->
|
||||
|
|
|
|||
Loading…
Reference in a new issue