angular-downloadsvg-directive

AngularJS directive to download an SVG element as an SVG file.
Author: 61000b294b0049e12fccc6b843ee8362?d=https%3a%2f%2fidenticons.github.com%2fe5288d00c9e82c82e6efb0e3a2463d13 Hypercubed
Submitted by: 509946? Hypercubed

angular-downloadsvg-directive

AngularJS directive to download an svg element as an SVG file.

Usage

  1. bower install Hypercubed/angular-downloadsvg-directive
  2. Include the FileSaver.js script into your app. By default should be at bower_components/FileSaver/FileSaver.svg.
  3. Include the angular-downloadsvg-directive.js into your app. By default should be at bower_components/angular-downloadsvg-directive/angular-downloadsvg-directive.js.
  4. Add hc.downloader as a module dependency to your app.

As a directive

<button svg-downloader label="Download svg" source="#chart" title="type.name" type="svg"></button>

Acknowledgments

Based on code snippit from raw by densitydesign.

License

MIT

comments powered by Disqus
This page was last updated almost 4 years ago.