title: Javascript injected ng-click function didn't fire
body: <p>I am using <a href="https://github.com/wenzhixin/bootstrap-table" rel="nofollow noreferrer">this bootstrap libary</a> for our server side tables and having some problem in firing the injected JS function.</p>
  
  <p>The library allows you to use the "data-formatter" to inject/format the html and we are using that formatter to edit/delete or other action for rows but our functions are all in AngularJS and seems like the injected HTML is not compiled and the ng-click function in scope is not firing.</p>
  
  <p>Here is the code below and I <a href="http://jsfiddle.net/794hsy3k/83/" rel="nofollow noreferrer">created a JSFiddle</a> as well to better demonstrate the issue. I'd prefer the app.directive solution to better re-use in our application, if any exists or other workaround? thanks.</p>
  
  <p><strong>HTML</strong></p>
  
  <pre><code>&lt;div ng-app="myApp" ng-controller="myCtrl"&gt;
  
  &lt;button class="btn btn-default" ng-click="test(0)"&gt;
  This works
  &lt;/button&gt;
  
  &lt;table data-toggle="table"
         data-show-print="true"
         data-url="/gh/get/response.json/wenzhixin/bootstrap-table/tree/master/docs/data/data1/"&gt;
      &lt;thead&gt;
      &lt;tr&gt;
          &lt;th data-field="name"&gt;Name&lt;/th&gt;
          &lt;th data-field="stargazers_count"&gt;Stars&lt;/th&gt;
          &lt;th data-field="forks_count"&gt;Forks&lt;/th&gt;
          &lt;th data-formatter="Action"&gt;Action&lt;/th&gt; 
      &lt;/tr&gt;
      &lt;/thead&gt;
  &lt;/table&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p><strong>JavaScript/AngularJS</strong></p>
  
  <pre><code>function Action(value, row){
      var html = '&lt;a ng-click="click(1)" href="#"&gt;Click me&lt;/a&gt;';
    return html;
  }
  
  var app = angular.module('myApp', []);
  app.controller('myCtrl', function($scope) {
  
      $scope.click = function(args){
          alert(args);
      }   
  
      $scope.test = function(args){
          alert(args);
      }   
  
  });
  </code></pre>