Angular: Empty Fiddle

http://angularjs.org/

by Andrei Horodinca

HTML

<script src="http://code.angularjs.org/angular-1.0.1.js"></script>
<div ng-controller="MyCtrl">
  
  <table>
    <tr ng-repeat="(key, value) in people[0]">
      <th>{{key}}</th>
      <td ng-repeat="person in people">
        {{person[key]}}
      </td>
    </tr>
  </table>
  
</div>

CSS

* {
  padding: 5px;
}

table {
    border: 1px solid black;
}

th {
    background-color: gray;
    font-weight: 700;
}

td:not(:first-of-type) {
  border-left: 1px solid gray;
}

JavaScript

var myApp = angular.module('myApp',[]);

function MyCtrl($scope) {
  $scope.people = [
    {
      "_id": "567137b02d704d495ec053c5",
      "age": 24,
      "name": "Schneider Crosby",
      "gender": "male",
      "email": "schneidercrosby@exiand.com",
      "phone": "+1 (814) 416-2089"
    },
    {
      "_id": "567137b09a169eda5257c206",
      "age": 34,
      "name": "Cook Richards",
      "gender": "male",
      "email": "cookrichards@exiand.com",
      "phone": "+1 (904) 515-2147"
    },
    {
      "_id": "567137b083eced915da6b38b",
      "age": 33,
      "name": "Latasha Ware",
      "gender": "female",
      "email": "latashaware@exiand.com",
      "phone": "+1 (865) 413-2197"
    },
    {
      "_id": "567137b0da06a0c8477b9a9d",
      "age": 33,
      "name": "Frederick Nicholson",
      "gender": "male",
      "email": "fredericknicholson@exiand.com",
      "phone": "+1 (900) 520-3490"
    },
    {
      "_id": "567137b041f034f44d93e3f9",
      "age": 39,
      "name": "Meghan Howell",
      "gender": "female",
      "email": "meghanhowell@exiand.com",
      "phone": "+1 (812) 420-2073"
    },
    {
      "_id": "567137b0c2b667b0e4a3c1b0",
      "age": 29,
      "name": "Rachael Conrad",
      "gender": "female",
      "email": "rachaelconrad@exiand.com",
      "phone": "+1 (935) 414-3802"
    },
    {
      "_id": "567137b06ae30e6627b97cc0",
      "age": 24,
      "name": "Hensley Rosa",
      "gender": "male",
      "email": "hensleyrosa@exiand.com",
      "phone": "+1 (933) 526-2930"
    }
  ]
}