Example: List people



examples/angular/list_people.html
<script src="angular.min.js"></script>
<script src="list_people.js"></script>
<div ng-app="DemoApp" ng-controller="DemoController">

  <div class="person" ng-repeat="p in people">
     <div>{{p.name}}</div>
     <div>{{p.email}}</div>
  </div>

</div>

<style>
  .person {
    background: #EEE;
    margin: 20px;
  }
</style

examples/angular/list_people.js
angular.module('DemoApp', [])
.controller('DemoController', ['$scope', function($scope) {
    $scope.people = [
        {
            name: 'Foo',
            email: 'foo@company.com'
        },
        {
            name: 'Bar',
            email: 'bar@company.com'
        },
        {
            name: 'Qux',
            email: 'qux@company.com'
        }
    ];

}]);