The following markup will make the button enabled on Chrome/Firefox but not on IE8 and older IEs:
<div ng:init="scope = { isDisabled: false }"> <button disabled="{{scope.isDisabled}}">Disabled</button> </div>
the HTML specs do not require browsers preserve the special attributes such as disabled.(The presense of them means true and absense means false) This prevents the angular compiler from correctly retrieving the binding expression. To solve this problem, we introduce ng:disabled.
<ANY ng:disabled="template"> ... </ANY>
template – {template} –
any string which can contain '{{}}' markup.
Click me to toggle: <input type="checkbox" name="checked"><br/> <button name="button" ng:disabled="{{checked}}">Button</button>
it('should toggle button', function() { expect(element('.doc-example-live :button').attr('disabled')).toBeFalsy(); input('checked').check(); expect(element('.doc-example-live :button').attr('disabled')).toBeTruthy(); });