diff options
| author | Pawel Kozlowski | 2013-07-18 20:44:27 +0200 |
|---|---|---|
| committer | Igor Minar | 2013-07-24 14:41:54 -0700 |
| commit | dc1e55ce1a314b6c1ad4b9d5b4a31226e1fa1e18 (patch) | |
| tree | 44795a8f90ab110067d149b107c94cc105da16b2 /src/ng/directive/form.js | |
| parent | 408e868237d80f9332f2c540f91b2809d9938fbc (diff) | |
| download | angular.js-dc1e55ce1a314b6c1ad4b9d5b4a31226e1fa1e18.tar.bz2 | |
fix(form): pick the right attribute name for ngForm
Closes #2997
Diffstat (limited to 'src/ng/directive/form.js')
| -rw-r--r-- | src/ng/directive/form.js | 4 |
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) { |
