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

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -