title: Download local file
body: <p><strong>Html File</strong></p>
  
  <pre><code>&lt;button mat-button (click) = "FileDownload"&gt;Download&lt;/button&gt;
  </code></pre>
  
  <p><strong>Anugular 4 Component Method</strong></p>
  
  <pre><code>FileDownload()
  {
    this.filePath = "D:\SamplePDF.pdf";
    document.loation.href = this.filePath;
  
  }
  </code></pre>
  
  <p>Here, I want to download the local file when button click happens. I am not able to download the file. Please help.</p>
  
  <p>PS: I am not able to access window.open() also as I am using angular 4 application.</p>