Hi Guys.
I need your help.
I wanna loop a json file in angularjs.
So far so good.
No Problem.
But now i have a problem :)
What I have tried:
The http call is:
$http({
method: 'GET',
url: 'url'
})
.then(function successCallback(response){
$scope.UserObject = response.data;
}, function errorCallBack(response){console.log('error: ' + response);});
my json file is:
<pre>{
"Firstname": "Me",
"Lastname": "Windy",
"EMail": "me.windy@shiny.com",
"Phone": "0110110111"
}
and my html code is:
<p ng-repeat="obj in UserObject">
{{ obj.Firstname }}
</p>
With {{ obj.Firstname }} i get no text. it´s empty.
if i list it with {{ obj }} i get all entrys.
the webservice is a c# webservice (Asmx) and i convert the jsonstring wie newtonsoft.
the json file is valid. but i dont understand why i can´t choose {{ obj.Firstname }}.
thanks m8ts.