0
I have a screen that there is a check box.. let’s see;
<div class="form-group col-md-9 pull-right">
              <label>Ativo:</label> 
               <label class="checkbox-inline"><input type="checkbox" ng-model="pessoa.pessoasFisicas.flagAtivo" value="" />Sim
              </label>
              </div>
I get from my api on my front the following flagAtivo:1 and obviously 0 when pertinent. The point is that it does not mount on the screen .. always comes unchecked the component, regardless of whether or 1.
I have a function that turns true and false to 1 and 0.
  $('input[type="checkbox"]').change(function () {
        this.value ^= 1;
    });
this is the method that brings the value of the flag
$http({
            method: 'GET',
            url: '/user/pessoasFisicas/'+ pes.idPessoa,
            //async: true
        }).then(function (response) {   
          $scope.pessoa.pessoasFisicas = response.data[0];
          flagAtivo:1 // resposta do método GET
Where is the part of the code that receives the value pertinent to the checkbox?
– Rafael Salomão
edited the question @Rafaelsalomão
– Eduardo Krakhecke
What is the reason for the value attribute in this input? Using angular and listening to a jQuery event?
– Maurivan
It is actually to transform a boolean value into a numerical value.
– Eduardo Krakhecke
humm.. put as answer for me to give ok here and close the question.
– Eduardo Krakhecke