title: AngularJS CSV file reader
body: <p>I am trying to read CSV files. I was going to upload into server memory and then read the contents of the file, but I stumbled upon this:</p>
  
  <pre><code>.directive('csvReader', function () {
      return {
          scope: {
              csvReader: "="
          },
          link: function (scope, element) {
              $(element).on('change', function (changeEvent) {
                  var files = changeEvent.target.files;
                  if (files.length) {
                      var r = new FileReader();
                      r.onload = function (e) {
                          var contents = e.target.results;
                          scope.$apply(function () {
                              scope.fileReader = contents;
                          });
                      };
  
                      r.readAsText(files[0]);
                  }
              });
          }
      };
  });
  </code></pre>
  
  <p>Now this would work perfectly on my site if it didn't use jQuery.
  Does anyone know how to read a CSV file without needing jQuery?</p>