This is driving me nuts, I\'m under the gun and can\'t afford to spend another whole day on this.
I am trying to manually set a control value (\'dept\') within the c
Tip: If you're using setValue but not providing every property on the form you'll get an error:
Must supply a value for form control with name: 'stateOrProvince'.
So you may be tempted to use patchValue, but this can be dangerous if you're trying to update a whole form. I have an address that may not have stateOrProvince or stateCd depending upon whether it is US or worldwide.
Instead you can update like this - which will use the nulls as defaults:
this.form.setValue( { stateOrProvince: null, stateCd: null, ...address } );