I'm trying to disable a button if the form in which it is in isn't valid. However, for some reason the $error array associated with the form is holding a list of ten useless errors (so the button is always off), all with the following shape:
{
"$validators": {},
"$asyncValidators": {},
"$parsers": [],
"$formatters": [
null
],
"$viewChangeListeners": [],
"$untouched": true,
"$touched": false,
"$pristine": true,
"$dirty": false,
"$valid": false,
"$invalid": true,
"$error": {
"required": true
},
"$name": "",
"$options": null
}
As you can see, with an empty $name property, and with no other helpful information.