wnabil / ngx-export-as

Angular 2+ / Ionic 2+ HTML/table element to export it as JSON, XML, PNG, CSV, TXT, MS-Word, Ms-Excel, PDF
MIT License
68 stars 40 forks source link

After exporting #71

Closed clintcfavor closed 4 years ago

clintcfavor commented 4 years ago

Hi again, is there a way that we can run specific function after pdf is exported?

wnabil commented 4 years ago

https://github.com/wnabil/ngx-export-as#get-started

function export() {
    // download the file using old school javascript method
    this.exportAsService.save(this.exportAsConfig, 'My File Name').subscribe(() => {
      // save started
    });
    // get the data as base64 or json object for json type - this will be helpful in ionic or SSR
    this.exportAsService.get(this.config).subscribe(content => {
      console.log(content);
    });
  }