From deb86fe357a901889bc4289087f0b9e69cb8a302 Mon Sep 17 00:00:00 2001 From: Misko Hevery Date: Fri, 16 Apr 2010 14:01:29 -0700 Subject: lots of small fixes --- src/directives.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/directives.js') 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); } -- cgit v1.2.3