15 lines
585 B
HTML
15 lines
585 B
HTML
|
<div class="container">
|
||
|
<form novalidate [formGroup]="form" (ngSubmit)="onSubmit()">
|
||
|
<div *ngFor="let section of dataModel.sections; let i=index;">
|
||
|
<section-form [form]="form.get('sections').get(''+i)" [dataModel]="section"></section-form>
|
||
|
</div>
|
||
|
<div style="margin-top:20px; padding-left: 15px;">
|
||
|
<a (click)="addSection()" style="cursor: pointer">
|
||
|
Add another section +
|
||
|
</a>
|
||
|
</div>
|
||
|
<button type="submit">Save</button>
|
||
|
|
||
|
<p>Form value: {{ form.value | json }}</p>
|
||
|
</form>
|
||
|
</div>
|