title: Angular multiple transclude dynamic number of elements
body: <p>Angular 1.5 enables the ability to <a href="https://docs.angularjs.org/api/ng/directive/ngTransclude" rel="noreferrer">multi transclude</a>. </p>
  
  <p>Notably, it'd be useful to be able to transclude a dynamic number of items into a directive and declare the names and locations of those transcludes at a later time (e.g. in the link/compile).</p>
  
  <p>To further illustrate, I want the ability to do something like:</p>
  
  <pre><code>//Example usage of directive
  &lt;multi-slot-transclude-example&gt;
  &lt;transclude1&gt;TEST1&lt;/div&gt;
  &lt;transclude2&gt;TEST2&lt;/div&gt;
  &lt;transclude3&gt;TEST3&lt;/div&gt;
  &lt;transclude4&gt;TEST4&lt;/div&gt;
  .... dynamic number of items ...
  &lt;/multi-slot-transclude-example&gt;
  
  //Example of directive that dynamically transcludes multiple items
  angular.module("multiSlotTranscludeExample", [])
      .directive("directiveName", function(){
      return {
          restrict: 'E',
          transclude: {
              't1': '?transclude1',
              't2': '?transclude2',
              //I'd like this list to be able to be defined non-statically (e.g. in link)
          },
          template: '&lt;div ng-repeat="n in transcludedElementList"&gt;'
          + '&lt;div ng-transclude="t{{n}"&gt;&lt;/div&gt;'
          + '&lt;/div&gt;'
          };
  })
  </code></pre>
  
  <p>Note that in the directive declaration which implements a multi-transclude, I have to have prior knowledge about the number of items that will be transcluded when declaring it. </p>
  
  <p>Is there a way to do something like this in either a link (or using a workaround), which would keep the same functionality that transclusion current offers?</p>