Opening PDF from angular blob in Internet explorer browser
<p>I have the following server side code in web api</p>

<pre><code>tempResponse = Request.CreateResponse(HttpStatusCode.OK);
tempResponse.Content = new StreamContent(stream);
tempResponse.Content.Headers.Add(@"Content-type", "application/pdf");
tempResponse.Content.Headers.ContentType = new   
System.Net.Http.Headers.MediaTypeHeaderValue("application/pdf");
tempResponse.Content.Headers.ContentDisposition = new 
System.Net.Http.Headers.ContentDispositionHeaderValue("inline");
</code></pre>

<p>I am using angular JS and following is the code in my javascript file.</p>

<pre><code>$http.post(apiURL + "/DownloadPdf", data, { responseType: 'arraybuffer'}, config)
.then(function (result) {
  var file = new Blob([result.data], { type: 'application/pdf' })
  var fileName = "CommissionStatement.pdf"

  if (window.navigator &amp;&amp; window.navigator.msSaveOrOpenBlob) {
    window.location.href = 'Assets/Document CheckList.pdf'
    window.navigator.msSaveOrOpenBlob(file, fileName)
  } else {
    var objectUrl = URL.createObjectURL(file)
    window.open(window.location.href = 'Assets/Document CheckList.pdf', '_blank')
    window.open(objectUrl, '_blank')

    $window.location.href =
      window.location.protocol + "//" +
      window.location.host + "?BrokerId=" +
      AgentInfo.Data.BrokerId +
      "&amp;OfficeCode=" +
      AgentInfo.Data.OfficeCode;
  }
});

console.log($scope.Result)
},
function (error) {
  $scope.Error = error.data
})
</code></pre>

<p>This blob opens fine in Google Chrome and FireFox. But IE will prompt for open or save. But I would like it to open in the browser. I would appreciate any input in making it open without prompting. Thanks</p>