Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jdforsythe/angular-filesaver
FileSaver.js wrapped by an Angular service
https://github.com/jdforsythe/angular-filesaver
angular angular-factory angularjs files filesaver
Last synced: 14 days ago
JSON representation
FileSaver.js wrapped by an Angular service
- Host: GitHub
- URL: https://github.com/jdforsythe/angular-filesaver
- Owner: jdforsythe
- License: mit
- Created: 2015-08-24T18:12:13.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-04-19T14:24:17.000Z (over 8 years ago)
- Last Synced: 2024-12-09T15:41:29.240Z (24 days ago)
- Topics: angular, angular-factory, angularjs, files, filesaver
- Size: 3.91 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# angular-filesaver
FileSaver.js wrapped by an Angular service##Installation
**Install using bower**```js
bower install angular-filesaver
``````html
```
Add as dependency in your module```js
angular.module('yourApp', ['FileSaver']);
```**Dependencies**
1. angular
2. filesaver.js (https://github.com/eligrey/FileSaver.js or `bower install file-saver.js`)
3. Blob.js (https://github.eligrey/Blob.js or `bower install blob`) - optional, for legacy browser supportRefer all dependencies in your page in the proper order
```html
```
###Usage
Use FileSaver as you would FileSaver's saveAs() method
```js
var blob = new Blob(['Hello, world!'], {type: 'text/plain;charset=utf-8'});
FileSaver(blob, 'hello world.txt');
```## Contribute
Please do. Update and send pull requests if you have anything to add.License - MIT.