title: Using ng-repeat in other directive with jQuery
body: <p>Firstly I'm really sorry if the following questions sound stupid. I know there are documentations but there is not enough example and I'm quite new with it.<br />
  <br />
  I tried to create a directive that might make use of <code>ng-repeat</code> <br />
  However it seems like that when the directive is linked, <code>ng-repeat</code> hasn't been evaluated at all. So whenever I tried to call the jQuery function inside the <code>postlink</code> function, the jQuery wouldn't work.</p>
  
  <pre><code>&lt;div my-directive&gt;
    &lt;div ng-repeat="image in images"&gt;
      &lt;img ng-src="image"&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>The scope contains something like this:</p>
  
  <pre><code>scope.images = ['http://placehold.it/100x100', 'http://placehold.it/100x100'];
  </code></pre>
  
  <p>In the directive I had roughly like the following:</p>
  
  <pre><code>angular.module('mymodule', []).directive('myDirective', function factory() {
    return {
      restrict: 'A',
      compile: function (tElement, tAttrs, transclude) {
        // #1
        return {
          pre: function preLink(scope, iElement, iAttrs, transclude) {
            // #2
          },
          post: function postLink (scope, iElement, iAttrs, controller) {
            // #3
          }
        };
      },
      link: function postLink(scope, iElement, iAttrs) {
        // jQuery code to convert the element
        // #4
      }
    };
  });
  </code></pre>
  
  <p>In addition, what's the difference between putting the code on #1, #2, #3 and #4 above? What's the rule of thumb here?<br />
  Where to put a code like probably jQueryUI's <code>$( "#datepicker" ).datepicker();</code>? Since from what I understand there, the function will manipulate (transform) the element and its children.<br />
  Thanks.</p>