title: AngularJS – append row after element in directive
body: <p>My question is similar as <a href="https://stackoverflow.com/q/15728521/1153358">this one</a>, but instead of prepending row, I want it to append. </p>
  
  <p>This doesn’t work:
  </p>
  
  <pre><code>app.directive('createTable', function ($compile) {
    return {
      link: function (scope, element, attrs) {
        var contentTr = angular.element('&lt;tr&gt;&lt;td&gt;test&lt;/td&gt;&lt;/tr&gt;');
        contentTr.parentNode.insertBefore(element, contentTr.nextSibling);
        $compile(contentTr)(scope);
      }
    }
  });
  </code></pre>