angular-docs-cn/public/docs/_examples/cb-dynamic-form/ts/app/dynamic-form.component.html
Torgeir Helgevold 3cb219c5ab docs(dynamic-cookbook): upgrade to use new forms api
convert exiting to use deprecated name

converted to new api

text

warnings

fix plunker

text

test weak

text

space

text

lint

order

tweak
2016-06-20 21:02:28 -04:00

18 lines
459 B
HTML

<!-- #docregion -->
<div>
<form (ngSubmit)="onSubmit()" [formGroup]="form">
<div *ngFor="let question of questions" class="form-row">
<df-question [question]="question" [form]="form"></df-question>
</div>
<div class="form-row">
<button type="submit" [disabled]="!form.valid">Save</button>
</div>
</form>
<div *ngIf="payLoad" class="form-row">
<strong>Saved the following values</strong><br>{{payLoad}}
</div>
</div>