-1

EDITED:

Now I'm trying this way

<input class="form-check-input deflog-check" type="checkbox" ngTrueValue = "1" ngFalseValue = "0" ng-value="chk_mail">

Ang getting the vahlue innangular like this

object2Edit.notificacion = Number($scope.chk_mail) + Number($scope.chk_mail);

but $scope.chk_mail is Nan

Afsrd3
  • 117
  • 1
  • 1
  • 7
  • 4
    it is not a really good practice to manipulate the DOM with jQuery inside angular. To set the element's value, you should use the controller variable you bind. – Kaddath Apr 16 '18 at 08:47

1 Answers1

1

Change

ng-value 

to

ng-model

good explanation on difference between two can be found here https://stackoverflow.com/a/28718132/7104041

EDIT:

just noticed other things. You should change this

<input class="form-check-input deflog-check" type="checkbox" ngTrueValue = "1" ngFalseValue = "0" ng-value="chk_mail">

to

<input class="form-check-input deflog-check" type="checkbox" ng-true-value= "1" ng-false-value = "0" ng-model="chk_mail">

and have your chk_mail assigned in controller

https://plnkr.co/edit/i9JdNnMAiK3O9No768Ei?p=preview

you can see how it works in this plunker

TestzWCh
  • 153
  • 1
  • 3
  • 14