# angular.directive.ng:disabled

Work in Progress This page is currently being revised. It might be incomplete or contain inaccuracies.

## Description

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.

## Usage

    <ANY ng:disabled="template">
       ...
    </ANY>

### Parameters

- `template – {template} –`

  any string which can contain '{{}}' markup.

## Example

      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();
      });