title: AngularJS : transclude ng-repeat inside directive
body: <p>I have a directive that transcludes the original content, parses it, and uses the information in the original content to help build the new content. The gist of it looks like this:</p>
  
  <pre class="lang-js prettyprint-override"><code>.directive('list', function() {
      return {
          restrict: 'E',
          transclude: true,
          templateUrl: '...',
          scope: true,
          controller: function($scope, $element, $attrs, $transclude) {
              var items;
              $transclude(function(clone) {
                  clone = Array.prototype.slice.call(clone);
                  items = clone
                      .filter(function(node) {
                          return node.nodeType === 1;
                      })
                      .map(function(node) {
                          return {
                              value: node.getAttribute('value')
                              text: node.innerHTML
                          };
                      });
              });
  
              // Do some stuff down here with the item information
          }
      }
  });
  </code></pre>
  
  <p>Then, I use it like this:</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;list&gt;
      &lt;item value="foo"&gt;bar&lt;/item&gt;
      &lt;item value="baz"&gt;qux&lt;/item&gt;
  &lt;/list&gt;
  </code></pre>
  
  <p>This all works fine like this. The problem occurs when I try to use an <code>ng-repeat</code> inside the directive content, like this:</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;list&gt;
      &lt;item ng-repeat="item in items" value="{{ item.value }}"&gt;{{ item.text }}&lt;/item&gt;
  &lt;/list&gt;
  </code></pre>
  
  <p>When I try to do this, there are no items. Anyone know why this wouldn't work, or if there is a better way of accomplishing the same kind of thing?</p>