Here is a snippet of code from my template:
<ul>
<li ng-repeat="x in names">
{{ x.name + ', ' + x.country }}
</li>
</ul>
And here is the corresponding JavaScript code:
app.controller('TestCtrl', ['$scope','MYService', function($scope, MYService) {
$scope.names = [
{name:'Jani',country:'Norway'},
{name:'Hege',country:'Sweden'},
{name:'Kai',country:'Denmark'}
];
}]);
However, when I view the result on my page, it displays like this:
{,}
{,}
{,}
Can anyone help me figure out why I can't access the values properly?