title: pass ng-repeat variable into custom directive
body: <p>I have an ng-repeat and a custom directive inside it to which I'm trying to pass the "item" variable from ng-repeat:
  </p>
  
  <pre><code>&lt;li ng-repeat="item in list"&gt;
     &lt;div custom-directive custom-data="item"&gt;&lt;/div&gt;
  &lt;/li&gt;
  </code></pre>
  
  <p>And imagine a dummy directive:
  </p>
  
  <pre><code>angular.module('someModule').directive('customDirective', function() {
      restrict: 'A',
      scope: {customData: '@'},
      link: function(scope) {
         console.log(scope.customData);
      }
  });
  </code></pre>
  
  <ul>
  <li>If I use <code>custom-data="item"</code> then customData inside the directive
  equals to the string "item".</li>
  <li>If I use <code>custom-data="{{item}}"</code> then customData inside the
  directive is a stringified representation of the <code>item</code> object and
  the references to other objects inside it are lost.</li>
  </ul>
  
  <p>The question is: how do I pass <code>item</code> in the form of object to my directive?</p>