vendredi 3 février 2017

how to get unchecked checkbox value in angularjs?

this is html code

<p>
   <input type="checkbox" ng-model='add_product.kids' class="filled-in" id="filled-in-box1" />
   <label for="filled-in-box1">Kids</label>
</p>

I need to get the value as false when the check box is unchecked ..

I print the model like this

console.log($scope.add_product)

but in that model the checkbox value is not showned ?

Can anybody hepl me ... Thanks in advance ..




Aucun commentaire:

Enregistrer un commentaire