<div ng-app="myApp" ng-controller="customersCtrl">
<ul>
<li ng-repeat="x in myData">
{{ x.Name + ', ' + x.Country }}
</ul>
</div>
<script>
var app = angular.module('myApp', []);
app.controller('customersCtrl', function($scope, $http) {
$http.get("customers.php").then(function (response) {
$scope.myData = response.data;
});
});
</script>
My json file is this
{"Name":"Peter","Country":"Germany"},
{"Name":"Ana","Country":"Mexico"}
I try to call it ,but not successful, any idea Thanks.......