title: Download a file with AngularJS
body: <p>I need to provide a link to download a file, the link must be hidden and accessible by any users, Here is my code , there are no errors whatsoever, but I can't even get the download dialog box to open:</p>
  
  <p>Template</p>
  
  <pre><code> &lt;a ng-href="#" target="page" type="button" class="btn" 
  ng-click="download()"&gt;Download&lt;/a&gt;
  </code></pre>
  
  <p>Script file</p>
  
  <pre><code>$scope.download = function(){
   //here i need to know the code,can anybody explain me
  }
  </code></pre>