I am beginner in angularJS..i am trying to create a simple sample in which a table row is created for each array item..but i got blank page as output..here is code..
<!DOCTYPE html>
<html>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.4/angular.min.js"></script>
<body ng-app="myApp">
<table ng-contrller="myCtrl" border="1">
<tr ng-repeat = "x in records">
<td>{{x.Name}}</td>
<td>{{x.Country}}</td>
</tr>
</table>
<script>
var app = angular.module("myApp", []);
app.controller("myCtrl", function($scope) {
alert('hi');
$scope.records = [
{
"Name" : "name1",
"Country" : "India"
},
{
"Name" : "name2",
"Country" : "Canada"
},
{
"Name" : "name3",
"Country" : "USA"
}
]
});
</script>
</body>
</html>
thanks in advance for help :)