title: Need to insert Script tag in angular 2
body: <p>I've already done a bit of reading and searching and pretty much everything I find points to that a script tag cannot be included in a template in Angular 2.  </p>
  
  <blockquote>
    <p>we are removing  tags from templates on purpose as you
    shouldn't use those to load code on demand.
    <a href="https://github.com/angular/angular/issues/4903" rel="noreferrer">https://github.com/angular/angular/issues/4903</a> [2015]</p>
  </blockquote>
  
  <p><em>However</em> - there is a function <a href="https://angular.io/docs/ts/latest/api/platform-browser/index/DomSanitizer-class.html#!#bypassSecurityTrustScript-anchor" rel="noreferrer"><code>bypassSecurityTrustScript</code></a></p>
  
  <p>I'd like to know when and how <code>bypassSecurityTrustScript</code> in Angular 2 is intended to be used?</p>
  
  <p>I know a similar question has been asked:
  <a href="https://stackoverflow.com/questions/39473049/angular2-dynamically-insert-script-tag">Angular2 dynamically insert script tag</a> - though no one answered their question of how to use <code>bypassSecurityTrustScript</code>, and I'm not sure how the provided answer to that question could even work as it appears to use JavaScript within a template.</p>