-
Notifications
You must be signed in to change notification settings - Fork 27.5k
Binding to "disabled" attribute fails on IE7/8 #351
Comments
This is a known issue, and I already have a fix for it in my private branch. The issue is that the older browser do not preserve the value boolean attributes such as disabled. This prevents the angular compiler from correctly retrieving the binding expression. This is not a bug per say, but angular should have a good answer. workarounduse ng:bind-attr <body ng:init="scope = { isDisabled: false }">
<button ng:bind-attr="{ disabled:'{{scope.isDisabled}}' }">Disabled</button>
</body> proposed fixprefix <body ng:init="scope = { isDisabled: false }">
<button ng:disabled="{{scope.isDisabled}}">Disabled</button>
</body> |
I think the fix should look more like (to be consistent with ng:class, ng:click, etc.): <body ng:init="scope = { isDisabled: false }">
<button ng:disabled="scope.isDisabled">Disabled</button>
</body> |
The |
where is this fix? can it be merged into master? |
It is in a half baked CL. Here is the patch src/markups.js @@ -134,7 +134,10 @@ angularTextMarkup('option', function(text, textNode, */ var NG_BIND_ATTR = 'ng:bind-attr'; -var SPECIAL_ATTRS = {'ng:src': 'src', 'ng:href': 'href'}; +var SPECIAL_ATTRS = {}; +forEach(
angularAttrMarkup('{{}}', function(value, name, element){ // don't process existing attribute markup if (angularDirective(name) || angularDirective("@" + name)) return; On Thu, Jun 2, 2011 at 11:58 AM, IgorMinar <
|
Volunteer |
The following markup will make the button enabled on Chrome/Firefox but not on IE:
The text was updated successfully, but these errors were encountered: