title: Angular2 and jQuery DataTables
body: <p>I've added Angular 2 to an older application which primarily was built using jQuery + plugins. I'm trying to use jQuery <a href="https://datatables.net/" rel="nofollow noreferrer">DataTables</a> inside of a Component. I can get it to load the table just fine. The problem is that I have a cell template that has NG2 event listeners. In Angular 1 I could use the $compile service to register them to the scope, but that's gone away. This is how the DataTable is created in code, including the cell template:</p>
  
  <pre><code>$('#myTable').DataTable({
          data: data,
          columns: [
              {
                  data: 'Dimension'
                  , render: function (data: any, type: any, obj: any, tbl: any) {
                      //return data;
                      var template =
                          `&lt;div class="container-fluid"&gt;
                          &lt;div class="row text-left" style=""&gt;
                              &lt;div&gt;
                                  &lt;div class="col-md-12"&gt;
                                      &lt;i class="glyphicon glyphicon-plus" (click)="showChildren()"&gt;&lt;/i&gt;&amp;nbsp;
                                      ${obj.Name}
                                      &amp;nbsp;&amp;nbsp;&lt;i class="glyphicon glyphicon-plus-sign" (click)="addNew()"&gt;&lt;/i&gt;
                                  &lt;/div&gt;
                              &lt;/div&gt;
                          &lt;/div&gt;
                      &lt;/div&gt;`;
  
                      return template;
                  }
              }
          ]
      });
  });
  </code></pre>
  
  <p>The (click) event listeners just get rendered as html and do nothing. How do I get them to work?</p>