title: AngularJS - Append element to each ng-repeat iteration inside a directive
body: <p>I'm using a ng-repeat inside a <code>&lt;tr&gt;</code> element together with a directive.</p>
  
  <p>Html:</p>
  
  <pre><code>&lt;tbody&gt;
    &lt;tr ng-repeat="row in rows" create-table&gt;
      &lt;td nowrap ng-repeat="value in row | reduceString&gt;{{value}}&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
  </code></pre>
  
  <p>Directive:</p>
  
  <pre><code>app.directive('createTable', function () {
          return {
  
              link: function (scope, element, attrs) {
                  var contentTr = scope.$eval('"&lt;tr ng-show=&amp;quot;false&amp;quot;&gt;&lt;td&gt;test&lt;/td&gt;&lt;/tr&gt;"');
                  $(contentTr).insertBefore(element);
              }
          }
      }
  );
  </code></pre>
  
  <p>Although I can append a new <code>&lt;tr&gt;</code> element to each iteration, I'm not able to get angular code executed after it's been added to the DOM (for example the ng-show inside the <code>&lt;tr&gt;</code>). Am I missing something obvious? </p>