I am new to angular and I am trying to create a simple form. I have created a form group that inside has elements that are also form group. And when I try to console log the form like this:
console.log(this.form.controls)
{logic: FormGroup}
logic: FormGroup
controls:
action: FormControl {_pendingDirty: false, _hasOwnPendingAsyncValidator: false, _pendingTouched: false, _parent: FormGroup, _onCollectionChange: ƒ, …}
conditions: FormArray
controls: Array(0)... and so on.
So what I need is iterate throught this conditions formArray, and when I try to access the value:
this.form.controls.logic.controls.conditions
I am getting undefined. How to access this conditions formArray?