mercredi 28 septembre 2016

Condition on checked property of checkbox in html

How can I put condition on checked property of checkbox?

I have checkboxes for each row in my application. In my database, I have a column 'IsSaved' whose value is either 0 or 1. If IsSaved for a row is 1 then checkbox should automatically be shown as selected.

Here's my code snippet:

<td style="text-align:center;">
    <input type="checkbox" name="select" value="${ID}" ng-checked="${IsSaved} ? true : false" />              
</td>

How can I achieve this?




Aucun commentaire:

Enregistrer un commentaire