diff options
| author | Misko Hevery | 2010-04-16 14:01:29 -0700 |
|---|---|---|
| committer | Misko Hevery | 2010-04-16 14:01:29 -0700 |
| commit | deb86fe357a901889bc4289087f0b9e69cb8a302 (patch) | |
| tree | fce4db8501a6c24430d611c95a4aa001119c7b89 /src/directives.js | |
| parent | 70e401ef100614295fc808e32f0142f07c315461 (diff) | |
| download | angular.js-deb86fe357a901889bc4289087f0b9e69cb8a302.tar.bz2 | |
lots of small fixes
Diffstat (limited to 'src/directives.js')
| -rw-r--r-- | src/directives.js | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/directives.js b/src/directives.js index 2ead4979..a37076d4 100644 --- a/src/directives.js +++ b/src/directives.js @@ -102,8 +102,13 @@ angularDirective("ng-bind-attr", function(expression){ this.$onEval(function(){ foreach(this.$eval(expression), function(bindExp, key) { var value = compileBindTemplate(bindExp).call(this, element); - if (REMOVE_ATTRIBUTES[lowercase(key)] && !toBoolean(value)) { - element.removeAttr('disabled'); + if (REMOVE_ATTRIBUTES[lowercase(key)]) { + if (!toBoolean(value)) { + element.removeAttr('disabled'); + } else { + element.attr(key, value); + } + (element.data('$validate')||noop)(); } else { element.attr(key, value); } |
