aboutsummaryrefslogtreecommitdiffstats
path: root/src/ng/directive
diff options
context:
space:
mode:
Diffstat (limited to 'src/ng/directive')
-rw-r--r--src/ng/directive/form.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ng/directive/form.js b/src/ng/directive/form.js
index 77f4379e..72f752be 100644
--- a/src/ng/directive/form.js
+++ b/src/ng/directive/form.js
@@ -40,7 +40,7 @@ function FormController(element, attrs) {
errors = form.$error = {};
// init state
- form.$name = attrs.name;
+ form.$name = attrs.name || attrs.ngForm;
form.$dirty = false;
form.$pristine = true;
form.$valid = true;
@@ -102,7 +102,7 @@ function FormController(element, attrs) {
*
* @description
* Sets the validity of a form control.
- *
+ *
* This method will also propagate to parent forms.
*/
form.$setValidity = function(validationToken, isValid, control) {