title: {{$index}} of ng-repeat computed after linker function of angular directive. $compile it?
body: <p>html</p>
  
  <pre><code>&lt;div repeater ng-repeat='item in items' class='first' id = '{{$index}}' &gt; {{item}} &lt;/div&gt;
  </code></pre>
  
  <p>angularjs directive:-</p>
  
  <pre><code>angular.module('time', [])
    .directive('repeater', function() {
  
      var linkFn = function(scope, element, attrs){
        var id = $(element).attr('id');
        alert(id); // {{$index}}
      } ...
  </code></pre>
  
  <p>dynamic id created inside ng-repeat, when evoked inside directive displays as {{$index}} instead of value = 0, 1, 2 ... </p>
  
  <p>How do you ensure when Linker function in directive executes the dynamic ids are used?  I think it can be done using <a href="http://docs.angularjs.org/api/ng.%24compile">$compile</a> inside the directive. But i can't quite figure how? </p>
  
  <pre><code>$compile(element)(scope) 
  </code></pre>
  
  <p>is the syntax. But obviously the wrong order.</p>