GenerateFields(customControl, customValue): FormGroup {
return this.fb.group({
customControl: new FormControl(customValue),
})
}
I am looking for a way to dynamically add the value of customControl
from the parameter passed in the GenerateFields()
method. How can I achieve this?
Currently, it always uses the key "customControl" instead of using the actual value that is passed to it.