title: Open a PDF in a new tab AND download with file name in Angular
body: <p>In Angular, I need to open a PDF in a new tab and allow the user to download it with a specific name (Example.pdf). The code below downloads the PDF however doesn't open a new tab (<code>target=_blank</code> is not working). Any ideas how to fix this?</p>
  
  <pre><code>show(blob){
      var fileURL: any = URL.createObjectURL(blob);
      var a = document.createElement("a");
      a.href = fileURL;
      a.target = '_blank';
      a.download = "Example.pdf";
      a.click();
  }
  </code></pre>