title: How do you access an ng-repeat item in a directive's scope?
body: <p>How do you set the scope value for something like this: </p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;div ng-controller="MyCtrl"&gt;
        &lt;my-element ng-repeat="p in people" person='p'&gt;&lt;/my-element&gt;
  &lt;/div&gt;
  </code></pre>
  
  <pre class="lang-javascript prettyprint-override"><code>var myApp = angular.module('myApp',[]);
  
  myApp.directive('myElement', function(){
      return {
          restrict: 'E',
          template: '&lt;div&gt;{{ name }}&lt;/div&gt; &lt;div&gt;{{ age }}&lt;/div&gt;'
      }
  });
  
  function MyCtrl($scope) {
      $scope.people = [{ name: 'Mike', age: 20 },{name: 'Peter', age: 22 }];
  }
  </code></pre>