pug - How to take value of a checkbox as 1 for checked box in jade -
i using jade in have checkbox in code. when user selects checkbox value send true server instead of 1 while unchecked boxes value sent 0. how can pass value of checkbox 1 when user checks checkbox.
input.form-control(type="checkbox", name="compare_form_required", id="compare_form_required", ng-model="program.compareformrequired")
i used ng-true-value="1" sets value 1 on check of checkbox have used way :
input.form-control(type="checkbox", name="compare_form_required", id="compare_form_required", ng-model="program.compareformrequired", ng-true-value="1")
Comments
Post a Comment