-1

I begin learning Angular.js and I have first little problem.

This is my hello.js file:

function Hello($scope, $http) {
  $http.get('URL').
  success(function(data) {
  $scope.response = data
 });}

The response is a *.json file that I need to parse. JSON looks in a way:

"data":[{
   "status":"true",
   "name":"blabla"
},{
   "status":"true",
   "name":"blabla2"
}]

In index.html file I have <div ng-controller="Hello"> where I would like to make a list of all JSON's status and name fields.

I have no idea how could I use ng-repeat in order to make a list of all components from *.json file. Could you help me? :)

Cheers,

Luke

Luke
  • 33
  • 1
  • 6
  • I've tried to do it in such a way: `
  • {{response.data.0.name}} : {{response.data.0.status}}
  • `. And of course it works.. but I have no idea how could I make auto-list.. not a list that I need to change.. – Luke May 20 '15 at 20:49