ngx-file-saver
This projet is an inspiration of eligrey FileSave.js.
The library is full compatible with Angular, and it's simple to use.
Source code
Source code can be found on my GitHub.
Browsers
I made some test on following browsers.
Firefox | 80 |
Google Chrome | 84 |
Microsoft Edge Chromium | 85 |
Install
npm install @clemox/ngx-file-saver
Usage
import { NgxFileSaverModule } from '@clemox/ngx-file-saver';
@NgModule({
imports: [ NgxFileSaverModule ]
})
import { NgxFileSaverModule } from '@clemox/ngx-file-saver';
constructor(
private fileSaver: NgxFileSaverService
) { }
this.fileSaver.saveUrl(url, 'Test.docx');
const blob = new Blob(['Test de blob'], { type: 'text/plain' });
this.fileSaver.saveBlob(blob, 'Test.txt');-