vendredi 30 octobre 2015

How to store values(i.e. 'Y'- for checked, 'N' - for unckecked) of multiple checkbox in database using angularjs?

I've attached the screenshot of my module. I want the store the values('Y','N') of selected checkbox in database

<tr data-ng-repeat="data in RoleOperation track by $index">
    <td>{{$index + 1}}</td>
    <td>
        <label>{{RoleOperation[$index].vname}}</label>
    </td>
    <td>
        <label>{{RoleOperation[$index].id}}</label>
    </td>

    <td class="text-center">
        <input type="checkbox" data-ng-model="data.viewflg[$index]" />
    </td>
    <td class="text-center">
        <input type="checkbox" data-ng-model="data.addflg[$index]" />
    </td>
    <td class="text-center">
        <input type="checkbox" data-ng-model="data.editflg[$index]" />
    </td>
    <td class="text-center">
        <input type="checkbox" data-ng-model="data.deleteflg[$index]" />
    </td>
</tr>

How to give value to data-ng-model? And how to access particular checkbox in controller? plz help me..




Aucun commentaire:

Enregistrer un commentaire