title: How to make FileReader work with Angular2?
body: <p>How to make FileReader work with <strong>Angular2</strong>!!</p>
  
  <p>When reading a file from client side with <strong>Angular2</strong> and Typescript, </p>
  
  <p>I try to use FileReader in this way:</p>
  
  <pre><code>var fileReader = new FileReader();
  fileReader.onload = function(e) {
      console.log("run fileReader.onload");
     //  ......
  }
  </code></pre>
  
  <p>But it doesn't work at all, this 'fileReader.onload' function will never be called.</p>
  
  <p>Really need a solution for reading files, please help. 
  Thanks</p>
  
  <p>Check this from an online IDE:</p>
  
  <p>preview:
  <a href="https://angular2-butaixianran.c9.io/src/index.html" rel="noreferrer">https://angular2-butaixianran.c9.io/src/index.html</a></p>
  
  <p>editor:
  <a href="https://ide.c9.io/butaixianran/angular2" rel="noreferrer">https://ide.c9.io/butaixianran/angular2</a></p>