I have a screen that has 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 flagActive: 1 and obviously 0 when pertinent. The issue is that it does not mount on the screen .. it always comes unchecked the component, regardless if or 1.
I have a function that transforms true and or 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