Hi
I am creating a web application having AngularJS as frontend and Perl as backend. I am using Perl Dancer and I am used to it but AngularJS is new to me. I am trying to make a simple RESTfull call to web app but It is not working. Below is the complete Code
<div ng-app="myApp" ng-controller="customersCtrl">
<ul>
<li ng-repeat="x in names">
{{ x.Name + ', ' + x.Country }}
</li>
</ul>
</div>
<script>
var app = angular.module('myApp', []);
app.controller('customersCtrl', function($scope, $http) {
$http.get("http://localhost:5000/about")
.success(function (response) {$scope.names = response.records;});
});
</script>
####
{"records":
{
"2":{"City":"México D.F.","Country":"Mexico","Name":"Ana Trujillo Emparedados y helados"},
"1":{"Name":"Alfreds Futterkiste","Country":"Germany","City":"Berlin"}
}
}
I am getting the blank page. :(