I am developing an application that needs to show the data returned in JSON format in a HTML table. My following code is capable of retrieving JSON data.
function bincontroller($scope, $http, $templateCache) {
$scope.updateModel = function () {
$http({
url: "/abc/abc/ss/ds/",
method: "GET",
params: {
data: {
"markingPeriod": 8,
"syear": 2013,
"teacherId": "",
"startDate": "2013-11-25",
"endDate": "2013-12-26"
},
r: "api/v1/Attendance/Bin"
}
}).success(function (data) {
data = angular.fromJson(data);
angular.forEach(data.collection.response, function (value, index) {
angular.forEach(value, function (val, ky) {
console.log(ky + " : " + val);
});
});
});
};
}