我ngTable
數據從$http
電話來源:我可以迭代和更新ngTable中的數據嗎?
$http.get('/book/list.json').then(function(response) {
$scope.tableParams = new ngTableParams({
page: 1,
count: 10
}, {
total: response.data.length,
getData: function ($defer, params) {
$defer.resolve(response.data.slice((params.page() - 1) * params.count(), params.page() * params.count()));
}
});
});
我想改變ngTable
數據的屬性之一單擊按鈕時:
$scope.markAllAsRead = function() {
// how do i iterate the data in ng-table here?
}
我怎麼能遍歷'ngTable'數據?