Skip to content

Commit 266b3a9

Browse files
author
Philipp Alferov
committed
Refine readme
1 parent 030d65f commit 266b3a9

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

README.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
angular-file-saver
2+
=========
3+
Angular file saver is an AngularJS service that provides integration of [FileSaver.js](https://github.com/eligrey/FileSaver.js/) that implements the
4+
HTML5 W3C saveAs() FileSaver interface in browsers that do not natively support
5+
it. The package also comes with [Blob.js](https://github.com/eligrey/Blob.js/)
6+
as a dependency to provide support of wide range of browsers.
7+
8+
##Dependencies
9+
- [AngularJS](https://github.com/angular/angular.js)
10+
- [FileSaver.js](https://github.com/eligrey/FileSaver.js/)
11+
- [Blob.js](https://github.com/eligrey/Blob.js/)
12+
13+
##Installation
14+
With bower
15+
```
16+
$ bower install angular-file-saver
17+
```
18+
##Basic usage
19+
20+
- Include the <code>fileSaver</code> module to yor project;
21+
22+
- Pass <code>SaveAs</code> service as a dependency;
23+
24+
- Invoke <code>SaveAs.saveFile()</code> with following arguments:
25+
26+
- `data` - data, represented as a string, an array or a [Blob object](https://developer.mozilla.org/en/docs/Web/API/Blob);
27+
- `filename`
28+
- `options` - set of options for the [Blob constructor](https://developer.mozilla.org/en/docs/Web/API/Blob) optional parameter if Blob object is passed as first argument)
29+
30+
##Demo
31+
32+
[Demo on the github project page](http://alferov.github.io/angular-file-saver/#demo)

0 commit comments

Comments
 (0)