title: Reading static files in angular2 as string
body: <p>I have an angular2 component like this:</p>
  
  <pre><code>@Component({
      selector: 'demo',
      template: `
          &lt;div [innerHTML]="content"&gt;&lt;/div&gt;
      `;
  })
  export class demoComponent {
      @Input() step: string;
  
      private content: string = '';
  
      ngOnInit () {
          if (this.step === "foo") {
              this.content = "bar";
          }
      }
  }
  </code></pre>
  
  <p>and I want to use some logic to decide on the most appropriate template to render. I have a series of static html files served by express on myDomain.com/templates. So I need to be able to "read" <code>./templates/xyz.html</code> into a string in my ng2 component. Similarly to the <code>fs.ReadFileSync</code> API in nodeJS. How can I do this? HTTP call? file reader?</p>