Skip to content

Commit a146af8

Browse files
author
Philipp Alferov
committed
Update documentation
1 parent dd2ca7b commit a146af8

File tree

2 files changed

+16
-18
lines changed

2 files changed

+16
-18
lines changed

docs/index.html

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -50,35 +50,34 @@ <h2 id="installation">Installation</h2>
5050
</code></pre>
5151
<h2 id="basic-usage">Basic usage</h2>
5252
<ul>
53-
<li>Include the <code>ngFileSaver</code> module into your project;</li>
53+
<li>Include <code>ngFileSaver</code> module into your project;</li>
5454
<li>Pass both <code>FileSaver</code> and <code>Blob</code> services as dependencies;</li>
55-
<li>Create a <a href="https://developer.mozilla.org/en/docs/Web/API/Blob">Blob object</a>
56-
passing an array with data as a first argument and an object with set of options
55+
<li>Create a <a href="https://developer.mozilla.org/en/docs/Web/API/Blob">Blob object</a> by
56+
passing an array with data as the first argument and an object with set of options
5757
as the second one: <code>new Blob([&#39;text&#39;], { type: &#39;text/plain;charset=utf-8&#39; })</code>;</li>
5858
<li>Invoke <code>FileSaver.saveAs</code> with the following arguments:<ul>
5959
<li><code>data</code> <strong>Blob</strong>: a Blob instance;</li>
60-
<li><code>filename</code> <strong>String</strong>: Custom filename (extension is optional);</li>
60+
<li><code>filename</code> <strong>String</strong>: a custom filename (an extension is optional);</li>
6161
<li><code>disableAutoBOM</code> <strong>Boolean</strong>: (optional) Disable automatically provided Unicode text encoding hints;</li>
6262
</ul>
6363
</li>
6464
</ul>
6565
<p><a href="http://alferov.github.io/angular-file-saver/#demo">Demo</a></p>
6666
<h2 id="api">API</h2>
6767
<h3 id="-filesaver-"><code>FileSaver</code></h3>
68+
<p>A core Angular factory.</p>
6869
<h4 id="-saveas-data-filename-disableautobom-"><code>#saveAs(data, filename[, disableAutoBOM])</code></h4>
6970
<p>Immediately starts saving a file</p>
7071
<h4 id="parameters">Parameters</h4>
7172
<ul>
7273
<li><strong>Blob</strong> <code>data</code>: a Blob instance;</li>
73-
<li><strong>String</strong> <code>filename</code>: Custom filename (extension is optional);</li>
74+
<li><strong>String</strong> <code>filename</code>: a custom filename (an extension is optional);</li>
7475
<li><strong>Boolean</strong> <code>disableAutoBOM</code> : (optional) Disable automatically provided Unicode text encoding hints;</li>
7576
</ul>
7677
<h3 id="-blob-blobparts-options-"><code>Blob(blobParts[, options]))</code></h3>
77-
<p>An Angular factory that returns a Blob instance.
78-
<a href="https://developer.mozilla.org/en/docs/Web/API/Blob">Blob API on MDN</a></p>
78+
<p>An Angular factory that returns a <a href="https://developer.mozilla.org/en/docs/Web/API/Blob">Blob instance</a>.</p>
7979
<h3 id="-saveas-data-filename-disableautobom-"><code>SaveAs(data, filename[, disableAutoBOM])</code></h3>
80-
<p>An Angular factory that returns a FileSaver.js <code>saveAs</code> polyfill.
81-
<a href="https://github.com/eligrey/FileSaver.js/#syntax">FileSaver.js documentationruvy</a></p>
80+
<p>An Angular factory that returns a <a href="https://github.com/eligrey/FileSaver.js/#syntax">FileSaver.js polyfill</a>.</p>
8281
<h2 id="example">Example</h2>
8382
<p><strong>JS</strong></p>
8483
<pre><code class="lang-js">function ExampleCtrl(FileSaver, Blob) {

readme.md

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,35 +29,34 @@ $ npm install angular-file-saver
2929
```
3030

3131
## Basic usage
32-
- Include the `ngFileSaver` module into your project;
32+
- Include `ngFileSaver` module into your project;
3333
- Pass both `FileSaver` and `Blob` services as dependencies;
34-
- Create a [Blob object](https://developer.mozilla.org/en/docs/Web/API/Blob)
35-
passing an array with data as a first argument and an object with set of options
34+
- Create a [Blob object](https://developer.mozilla.org/en/docs/Web/API/Blob) by
35+
passing an array with data as the first argument and an object with set of options
3636
as the second one: `new Blob(['text'], { type: 'text/plain;charset=utf-8' })`;
3737
- Invoke `FileSaver.saveAs` with the following arguments:
3838
- `data` **Blob**: a Blob instance;
39-
- `filename` **String**: Custom filename (extension is optional);
39+
- `filename` **String**: a custom filename (an extension is optional);
4040
- `disableAutoBOM` **Boolean**: (optional) Disable automatically provided Unicode text encoding hints;
4141

4242
[Demo](http://alferov.github.io/angular-file-saver/#demo)
4343

4444
## API
4545
### `FileSaver`
46+
A core Angular factory.
4647
#### `#saveAs(data, filename[, disableAutoBOM])`
4748
Immediately starts saving a file
4849

4950
#### Parameters
5051
- **Blob** `data`: a Blob instance;
51-
- **String** `filename`: Custom filename (extension is optional);
52+
- **String** `filename`: a custom filename (an extension is optional);
5253
- **Boolean** `disableAutoBOM` : (optional) Disable automatically provided Unicode text encoding hints;
5354

5455
### `Blob(blobParts[, options]))`
55-
An Angular factory that returns a Blob instance.
56-
[Blob API on MDN](https://developer.mozilla.org/en/docs/Web/API/Blob)
56+
An Angular factory that returns a [Blob instance](https://developer.mozilla.org/en/docs/Web/API/Blob).
5757

5858
### `SaveAs(data, filename[, disableAutoBOM])`
59-
An Angular factory that returns a FileSaver.js `saveAs` polyfill.
60-
[FileSaver.js documentation](https://github.com/eligrey/FileSaver.js/#syntax)
59+
An Angular factory that returns a [FileSaver.js polyfill](https://github.com/eligrey/FileSaver.js/#syntax).
6160

6261
## Example
6362
**JS**

0 commit comments

Comments
 (0)