mardi 24 novembre 2015

How to post values for checkboxes with ng-model?

I have two checkboxes in the form now user can select one or both and post the data to server, But i am not sure,how i will bind both values to $scope.ng-model when user post the data ?

main.html

<div class="col-md-8 col-md-offset-2">
    <label class="checkbox">
        <input type="checkbox" ng-value="'uploadPrc'" ng-model="prcModel">Upload PRC
    </label>
    <label class="checkbox">
        <input type="checkbox" ng-value="'uploadPrt'" ng-model="prtModel">Upload PRT
    </label>
</div>




Aucun commentaire:

Enregistrer un commentaire