Am trying to figure out how to check the state of a ngModel without using a form tag. I don\'t have wrappers is just basic input element with a ngModel.
All the example
If you give the
element anameattribute, then thewill be added to the$scopeobject as a property.
Field controller will then be attached to theformproperty.
As weird as it could seem, you have to define an enclosing form with a name attribute like so:
and call the property with:
$scope.myForm.lastname.$dirty
Indeed, ngModelController (field) is attached to ngFormController (form).