In this tutorial by Jenkov, he asserts that you can give a form a name, and then access it in the controller by
$scope.FORM_NAME.INPUT_NAME
For example like
<form name="myFormNg" ng-submit="myForm.submitTheForm()" >
<input name="firstName" type="text" ng-model="myForm.firstName">
</form>
and then in Angular
$scope.myFormNg.firstName
However, when I try it, instead of getting what I typed into the input box (abc), I get this whole object:
{"$viewValue":"abc","$modelValue":"abc","$$rawModelValue":"abc","$validators":{},"$asyncValidators":{},"$parsers":[],"$formatters":[null],"$viewChangeListeners":[],"$untouched":false,"$touched":true,"$pristine":false,"$dirty":true,"$valid":true,"$invalid":false,"$error":{},"$$success":{"parse":true,"required":true},"$name":"email","$options":null,"$$lastCommittedViewValue":"abc"}
Why? Is there a cleaner way to do it that Jenkov omits?