title: Download a file from asset folder when clicking on a button
body: <p>I am working on an angular2 project, I have a file in assets folder and I have created a button to download the file while running the app. </p>
  
  <p>I see there are quite a many solutions to the above problem so i got confused. Can you please help.</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;button pButton type="button" (click)="f1()" label="Download Sample Defaults 
  XML File"&gt;&lt;/button&gt;
  </code></pre>
  
  <p>I need code for f1() which can help me download the file to my Download folder when clicking on above button. Help appreciated. Thanks</p>