I have a form with some inputs and some checkbox, when I do the search the bank is returned Json , and the input fields are filled in because the checkboxes are not checked even though I have declared ng-model of it:
<p>
<input type="checkbox" name="t0080_pbm_testado" id="t0080_pbm_testado" icheck ng-model="checklist.t0080_pbm_testado" />
<label for="checkbox_demo_1" class="inline-label">Teste</label>
</p>
What's wrong?
View slice
<div class="uk-form-row">
class="uk-grid">
<p>
<input type="checkbox" name="t0080_pbm_instalado" id="t0080_pbm_instalado" icheck ng-model="checklist.t0080_pbm_instalado" />
<label for="checkbox_demo_1" class="inline-label">Instalação</label>
</p>
<p>
<input type="checkbox" name="t0080_pbm_configurado" id="t0080_pbm_configurado" icheck ng-model="checklist.t0080_pbm_configurado" />
<label for="checkbox_demo_1" class="inline-label">Configuração</label>
</p>
<p>
<input type="checkbox" name="t0080_pbm_testado" id="t0080_pbm_testado" icheck ng-model="checklist.t0080_pbm_testado" />
<label for="checkbox_demo_1" class="inline-label">Teste</label>
</p>
<p>
<input type="checkbox" name="t0080_pbm_treinado" id="t0080_pbm_treinado" icheck ng-model="checklist.t0080_pbm_treinado" />
<label for="checkbox_demo_1" class="inline-label">Treinamento</label>
</p>
</div>
</div>
Angled controller method
$scope.checklist = {};
$scope.getCheckList = function () {
var url = "http://localhost:23714/CheckList/getCheckList?idEmpresa=1&user=a&pass=1";
$http.get(url).success(function (data) {
$scope.checklist = data;
})
};
** inputs are normally filled, checkboxes are not