title: Error: access denied on anchor tag click - while trying to download file in AngularJS
body: <p>I have file content as byte array which is returnedfrom API controller. when a anchor tag is clicked I would like to download the content as file in the respective format like doc/docx/pdf. I'm using IE11 - HTML5 download attribute is not supported in IE11.
  Please suggest me a solution.</p>
  
  <p>Here is the code I have used: </p>
  
  <pre><code>function(data, status) {
      if (data != null) {
          var blob = new Blob([data.FileContent], {
              type: 'application/pdf'
          });
          var downloadurl = (window.URL || window.webkitURL).createObjectURL(blob);
  
          var a = document.createElement('a');
          a.href = downloadurl;
          //a.download = "content.txt" as IE doesn't support download attribute
          a.target = "_blank";
          document.body.appendChild(a);
          a.click(); // here it throws error access denied
          document.body.removeChild(a);
      }
  }
  </code></pre>