Here is the JSON data fetched from my web service:
[{"cameraid":"ggh","timestamp":"2016/05/10 01:31","filename":"ffffpg"},
{"cameraid":"mason","timestamp":"2016/05/10 05:31","filename":"aaa.png"}
This is the HTML code I have:
<!doctype html>
<html ng-app="camListApp">
<head>
<title>Hello AngularJS</title>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.0.8/angular.min.js"></script>
<script>
var camListApp = angular.module('camListApp');
camListApp.controller('Hello', ['$scope', '$http', function($scope, $http){
function Hello($scope, $http) {
$http.get('http://localhost/camera/list').
success(function(data) {
$scope.record= data;
});
}
</script>
</head>
<body>
<div ng-controller="Hello">
<table border = 1>
<thead>
<tr>
<th>camid</th>
<th>Timestamp</th>
<th>Filename</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="record in record">
<td>{{record.cameraid}}</td>
<td>{{record.timestamp}}</td>
<td>{{record.filename}}</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>
https://i.sstatic.net/ppJ7q.png
However, when I view this in my browser, the table remains empty. I am unsure of what I might have missed or done wrong. Can anyone provide any guidance on how to display the data in the table as intended?