When following the Hero guide, I encountered an issue while trying to reset all fields in the model using the provided code snippet.
this.form.reset({
"firstName": "",
"lastName": "bzz",
"reporter": ""
});
The problem arises when only non-empty fields, like bzz in the example, are actually being reset. I attempted to resolve this by using setValue(...)
, but unfortunately, this yielded the same outcome. My online search for a solution led me back to the Hero examples with no clear answer.
I also experimented with the following alternative approach, yet encountered the same issue.
this.form.get("firstName").patchValue("");
Any insights on what might be missing here would be greatly appreciated.