title: Third party JS in Angular2 typescript
body: <p>I'm new to angular and typescript, so this is probably really basic.</p>
  
  <p>I'm trying to make an angular2 component with a chart (using Chart.js) in the template.</p>
  
  <p>I realize there is a <a href="http://valor-software.github.io/ng2-charts/" rel="noreferrer">chart directive</a> being developed, that specifically uses Chart.JS, but I would like to understand how to do this, as it will undoubtedly come up in an instance where a directive isn't available.</p>
  
  <p>So far I've tried to do this simple thing in the template:</p>
  
  <pre><code>&lt;canvas id="chart"&gt;&lt;/canvas&gt;
  &lt;script&gt; 
  $(function () {
  //instantiate chart on $("#chart")
  });
  &lt;/script&gt;
  </code></pre>
  
  <p>But this javascript doesn't even run when the template has been loaded by angular2.</p>
  
  <p>How would I go about this?</p>