diff --git a/src/markups.js b/src/markups.js index 955b98445b41..3144bbb05dcb 100644 --- a/src/markups.js +++ b/src/markups.js @@ -418,7 +418,7 @@ angularAttrMarkup('{{}}', function(value, name, element){ value = decodeURI(value); var bindings = parseBindings(value), bindAttr; - if (hasBindings(bindings)) { + if (hasBindings(bindings) || SPECIAL_ATTRS[name]) { element.removeAttr(name); bindAttr = fromJson(element.attr(NG_BIND_ATTR) || "{}"); bindAttr[SPECIAL_ATTRS[name] || name] = value; diff --git a/test/markupSpec.js b/test/markupSpec.js index 36861e174fa2..ea786395673f 100644 --- a/test/markupSpec.js +++ b/test/markupSpec.js @@ -154,6 +154,14 @@ describe("markups", function(){ expect(sortedHtml(element)).toEqual(''); }); + it('should bind Text with no Bindings', function() { + forEach('src,href,checked,disabled,multiple,readonly,selected'.split(','), function(name) { + compile('
'); + expect(sortedHtml(element)).toEqual(''); + dealoc(element); + }); + }) + it('should Parse Text With No Bindings', function(){ var parts = parseBindings("a"); assertEquals(parts.length, 1);