Here is my controller, being served from localhost port 80:
function ListCtrl($scope, $http) {
$http.get('/api/moz').success(function (data) {
$scope.moz = data;
});
}
And the output from curl:
curl -i localhost/api/moz
HTTP/1.0 302 Found
Date: Tue, 21 May 2013 13:35:43 GMT
Server: WSGIServer/0.1 Python/2.7.4
Content-Type: application/json
[{"sID": 0, "sName": "Sa"},{"sID": 0, "sName": "Ab"},{"sID": 0, "sName": "Ds A"}]
Unfortunately the output from {{moz}}
is []
.
Been working on this for many hours now, and have no clue how to get it to work. My scaffold is identical to step5 of the angularjs tutorial.