I have an angular form with a checkbox ready to submit.
<form name="productForm" class="form-horizontal" role="form" ng-submit='action(productForm.$valid)' novalidate>
<div class="form-group">
<input type='checkbox' name='subtract' data-ng-model='product.subtract'/>
</div>
</form>
The problem is The default value of this thing in database is 1.
I assume if I don't select the checkbox it will record 0 in the database for me. But somehow this input checkbox is not submitted and the db just takes the defined default value '1'.
Any chance someone know what is happening here? Thanks!