I am new to angularjs,
Here is my code:
<!DOCTYPE HTML>
<html ng-app="myapp">
<head>
<meta charset="utf-8">
<title>Angularjs project</title>
<script type="text/javascript" src="angular.min.js"></script>
<script>
var myapp=angular.module('myapp',[]);
myapp.controller('myctrl', function ($scope,$http) {
$http.get('countries.json').success(function(data){
$scope.countries=data;
});
});
</script>
<body>
<div ng-controller="myctrl">
<table>
<tr>
<th>country</th>
<th>population</th>
</tr>
<tr ng-repeat="country in coutries">
<td>{{country.name}}</td>
<td>{{country.population}}</td>
</tr>
</table>
</div>
</body>
</html>
And i have a json file, when it run, it doesn't work.
When i referred in google, they are saying server.js or install node.js something like that.
I just confused,what should i follow, can anyone guide me to fetching json data and display.
any help would be highly appreciated.
Thanks in advance.,