Hey everyone, I'm currently working with AngularJS ng-repeat and I am trying to dynamically bind a checkbox based on a true or false value from the database. However, even when the database value is set to true, the checkbox does not automatically check or uncheck itself. How can I fix this issue?
serverjs// app.get('/contactdetail', function (req, res) {
console.log('I received a GET request');
db.contactdetail.find(function (err, docs) {
console.log(docs);
res.json(docs);
});});
controller var refresh = function () {
$http.get('/contactdetail').success(function (response) {
console.log('I received a GET request');
$scope.contactdetail = response;
});
};refresh();
<tr ng-repeat="contacts in contactdetail><span editable-checkbox="contacts.Number" e-name="Number" e-form="rowform" onaftersave="Dhkclick(contacts._id, contacts.Number)">{{ contacts.Number|| 'empty' }}
</span></tr>