title: Angular : How to compile a directive from a link function?
body: <p>I created a directive with this link function:</p>
  
  <pre><code>link : function (scope, element, attrs, controller) {
           var markdownContent = {};    
           markdownContent.result = element.text();
           markdownContent.result += '&lt;button ng-click="console.log("test")" class="btn btn-primary btn-xs" &gt;&lt;i class="icon-edit"&gt;&lt;/i&gt;&lt;/button&gt;'; 
                      }
          element.html(markdownContent.result);
  </code></pre>
  
  <p>The trouble is that the ng-click directive isn't working. </p>
  
  <p>I am pretty sure that the problem is that I need to compile for say to angular that I need to check this element. But I don't understand the syntax and the process...</p>
  
  <p>If someone can help me it will be great!  </p>
  
  <p><strong>EDIT : HERE MY PLUNKER</strong> <a href="http://plnkr.co/edit/CH8XgBwDFSp5y9Qd3c1f?p=preview" rel="nofollow">plunker</a></p>
  
  <p>It doesn't work because when I click on the button the function test() isn't called</p>