aboutsummaryrefslogtreecommitdiffstats
path: root/src/directives.js
diff options
context:
space:
mode:
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);
}