Here is my component.ts:
constructor(
private fb: FormBuilder,
) {}
formobject = {} as GKCLForm1;
gkclForm1 = this.fb.group({
gcklform1 : this.fb.control(this.formobject)
});
And here the component.html:
<form [formGroup]="gkclForm1">
<label>
info:
<input type="text" formControlName="gcklform1.info">
</label>
<label>
id:
<input type="text" formControlName="gcklform1.id">
</label>
</form>
I have an object which type is GKCLForm1. info and id are the properties of that object.
And I want to create a form group from one object is it possible? ( I am using Angular 6 )