title: Download text/csv content as huge file from server in Angular
body: <p>I have a backend server in play framework, which returns huge text/csv file in chunks.
  How can I receive the file in angular in order to be able save the file in the client.</p>
  
  <p>In regular file download I can use the following solution:</p>
  
  <pre><code>$http.post('/exportFile', reqData).
              success(function(data, status, headers, config){
                  var pom = document.createElement('a');
                  pom.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(data));
                  pom.setAttribute('download', "file.csv");
                  pom.click();
              }).
              error(function(data, status, headers, config){
                  alert(data);
              });
  </code></pre>
  
  <p>But how to handle chunks?
  Thanks!</p>