3

I want to disabled the button Dissolve if the field in the status column is close or vise versa.

I tried applying ng-module n ng- disabled but something went wrong.

If anybody knows how to do it in Angularjs then plz help me out

<table>
    <tr>
        <th>Ticketid</th>
        <th>status</th>
        <th>Dissolve</th>
    </tr>
    <tr>
        <td>12345</td>
        <td>Close</td>
        <td><button>Dissolve</button></td>
    </tr>
    <tr>
        <td>4321</td>
        <td>open</td>
        <td><button>Dissolve</button></td>
    </tr>
</table>
Gleb Kemarsky
  • 10,160
  • 7
  • 43
  • 68

1 Answers1

1

You need to use ng-if and ng-disabled together,

 <tr>
    <td>4321</td>
    <td>open</td>
    <td ng-if="status ==='close'"><button ng-disabled="true">Dissolve</button></td>
</tr>
Sajeetharan
  • 216,225
  • 63
  • 350
  • 396