title: Download file not working
body: <p>I am new to Javascript, I want to download a file that comes from a dynamic url after the result of a promise, it is a generated pdf which I am trying to download with the following call but unable to make it work as download doesn't start.</p>
  
  <pre><code>&lt;button (click)='downloadMyFile()'&gt;Download&lt;/button&gt;
  
  downloadMyFile(){
    //url 
    .then((result)=&gt;{
     //result is contains a url www.abc.com/file234
      window.location.href = result
  })
    .catch((error)=&gt;{
     //myerror
  })
  }
  </code></pre>
  
  <p>Here is <a href="https://plnkr.co/edit/vlu7aUQ6d3hK8fP1NNJO?p=preview" rel="noreferrer">plunk</a></p>