大家好,我使用 angularjs ng-repeat。我想根据 db 值 true 或 false 绑定复选框。但是复选框不会检查/取消选中 db 值是否为 true?
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>