title: Download PDF file is not working with angular and JavaScript
body: <p><a href="https://i.stack.imgur.com/BH750.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/BH750.png" alt="enter image description here"></a> </p>
  
  <p>I am using below code for downloading PDF files.File is downloaded but doesn't contain any data.</p>
  
  <pre><code>     var blob = new Blob([response], { type: "text/plain"});
       var url = window.URL.createObjectURL(blob); 
       var link = document.createElement('a');
       link.href = url;
       link.download = e.coAttachmentName; 
       link.click();
  </code></pre>