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 a
name
attribute, then thewill be added to the
$scope
object as a property.
Field controller will then be attached to theform
property.
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).