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: about 1 year 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 (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2016-04-19T14:24:17.000Z (about 10 years ago)
- Last Synced: 2025-03-13T05:11:33.751Z (over 1 year 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 support
Refer 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.