title: How to access the ng-repeat item from an inner custom directive
body: <p>I am having a problem with my custom directive inside an ng-repeat.  One of the values I'm trying to bind always ends up being undefined:</p>
  
  <p>ItemList template</p>
  
  <pre><code>&lt;div&gt;
    &lt;table&gt;
      &lt;thead&gt;
        &lt;tr&gt;
          &lt;th ng-repeat="column in itemContext.columns"&gt;{{column.heading}}&lt;/th&gt;
        &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
        &lt;!-- Also experimented leaving item='item' out as well --&gt;
        &lt;tr item="item" ng-repeat="item in itemList.items"&gt;
          &lt;item-column item="item" column="column" ng-repeat="column in itemContext.columns"&gt;&lt;/item-column&gt;
        &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>ItemColumn Template</p>
  
  <pre><code>&lt;!-- Problems here because item is undefined --&gt;
  &lt;td ng-class="columnClasses(column, item)"&gt;{{column.itemField(item)}}&lt;/td&gt;
  </code></pre>
  
  <p>Directives</p>
  
  <pre><code>.directive('itemColumn', ["$rootScope", function($rootScope) {
    return {
      restrict: 'E',
      replace: 'true',
      templateUrl: '/templates/itemColumn.html',
       scope:{
         item: "=",
         column: "="
      },
      link: function(scope, element, attrs) {
  
        console.log("-- Loading item column --");
        // sope.column is what I would expect, but scope.item is undefined
        console.log(scope);
      }
    };
  }])
  </code></pre>
  
  <p>Any ideas on what I need to do to be able to access the <code>item</code> binding from ng-repeat in my directive?</p>
  
  <p>In general, do I need to create a redundant attribute binding when using ng-repeat:</p>
  
  <pre><code>&lt;item-column item="item" column="column" ng-repeat="column in itemContext.columns"&gt;&lt;/item-column&gt;
  </code></pre>
  
  <p>In my directive I use <code>"="</code>for the column binding, so do i need the <code>column="column"</code>in the template?</p>
  
  <p>Thanks </p>