Skip to content

Angular JS Directive used to trigger an asynchronous-like file download

License

Notifications You must be signed in to change notification settings

saulolozano/ng-download

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ngDownload

Simple AngularJS Directive used to trigger an asynchronous-like file download

Usage:

  • Install: bower install ng-download
  • Add ngDownload to your code:
<script src="bower_components/ng-download.js"></script>
  • Add ngDownload as a dependency of your application.
angular.module('app', ['ngDownload']);
  • Implement the directive in your html:
<button ng-download="{{urlToPublicFile}}" params="optionalParameters">Download</button>
  • urlToPublicFile has to be an url to a public file
  • params (object) is optional. You can add all the query strings parameters you wish to add to the url

Done!

About

Angular JS Directive used to trigger an asynchronous-like file download

Resources

License

Stars

Watchers

Forks

Packages

No packages published