mardi 27 juin 2017

Assigning value to checkboxes through ng-model

I have a checkbox that I want to have a value=0. I have also assigned a ng-moel to it

<input type="checkbox" class="input-group inline form-control" value="0" name="" id="deletelanguage" ng-show="IsVisible" ng-model="delStat">

The scope in my controller looks like this.

$scope.delStat="";

I want to changed the value of the checkbox to 1 if it is checked. How can I do that?




Aucun commentaire:

Enregistrer un commentaire