aboutsummaryrefslogtreecommitdiffstats
path: root/src/directives.js
diff options
context:
space:
mode:
authorMisko Hevery2010-04-16 14:01:29 -0700
committerMisko Hevery2010-04-16 14:01:29 -0700
commitdeb86fe357a901889bc4289087f0b9e69cb8a302 (patch)
treefce4db8501a6c24430d611c95a4aa001119c7b89 /src/directives.js
parent70e401ef100614295fc808e32f0142f07c315461 (diff)
downloadangular.js-deb86fe357a901889bc4289087f0b9e69cb8a302.tar.bz2
lots of small fixes
Diffstat (limited to 'src/directives.js')
-rw-r--r--src/directives.js9
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);
}