title: How to read a csv file on angular2 line by line
body: <p>I am programming an application in angular2 that reads a csv file with a simply input in html:</p>
  <pre><code>&lt;input type='file' name='userFile' id='file' &gt;
  </code></pre>
  <p>I can access to the file at the component.ts:</p>
  <pre><code>ngOnInit() {
  
     var input = (&lt;HTMLInputElement&gt;document.getElementById(&quot;file&quot;));
     input.addEventListener(&quot;change&quot;, function(event) {
        var files = input.files;
        var len = files.length;
  
           if (len) {
            console.log(&quot;Filename: &quot; + files[0].name);
            console.log(&quot;Type: &quot; + files[0].type);
            console.log(&quot;Size: &quot; + files[0].size + &quot; bytes&quot;);
      
           }
  
        }, false);
  
  }
  </code></pre>
  <p>How can I read cell by cell a csv file uploaded using typescript, JavaScript or jQuery? (and which is the best way to do it).</p>