Update form group name to conform to Name interface
parent
c17d79d16c
commit
2bf76e87c8
|
@ -1,5 +1,5 @@
|
|||
<form *ngIf="form" [formGroup]="form">
|
||||
<ng-container formGroupName="nameGroup">
|
||||
<ng-container formGroupName="name">
|
||||
<div>
|
||||
<label for="firstName">First Name: </label>
|
||||
<input name="firstName" formControlName="firstName">
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<form [formGroup]="form">
|
||||
<nested-forms-name [nameGroup]="form.get('nameGroup')"></nested-forms-name>
|
||||
<nested-forms-name [nameGroup]="form.get('name')"></nested-forms-name>
|
||||
<nested-forms-address-list [addressArray]="form.get('addresses')"></nested-forms-address-list>
|
||||
</form>
|
||||
<hr />
|
||||
|
|
|
@ -14,7 +14,7 @@ export class ContactFormService {
|
|||
const addresses: FormArray = this.fb.array([]);
|
||||
|
||||
const group = this.fb.group({
|
||||
nameGroup: this.fb.group({
|
||||
name: this.fb.group({
|
||||
firstName: [name ? name.firstName : ''],
|
||||
lastName: [name ? name.lastName : ''],
|
||||
middleName: [name ? name.middleName : ''],
|
||||
|
|
Loading…
Reference in New Issue