Skip to content

bulbul5391/bl2-js-reports

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

21 Commits
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

bl2-js-report

JS Beautifier

๐Ÿ’ž๏ธ๐Ÿ’ž๏ธ๐Ÿ’ž๏ธ BL2 JS REPORT ๐Ÿ’ž๏ธ๐Ÿ’ž๏ธ๐Ÿ’ž๏ธ

Join the chat Linkedin Follow

NPM stats

Installation

npm i bl2-js-report

Uninstall

npm uninstall bl2-js-report

๐Ÿ’ž๏ธ Basic Usage

Add line in component file

import * as bl2Js from 'bl2-js-report';

In html page

<button (click)="downloadPdf()" type="button">Download PDF</button>

In js or ts file

downloadPdf() {
        this.data['fileName'] = 'save-file-name';
        this.data['templateName'] = 'ti-reports/Researcher-Profile-Information'; //file path       
        this.data['data'] = JSON.stringify(this.data);
        this.data['userDetails'] = JSON.stringify(this.userData);
        this.data['isInstitutional'] = JSON.stringify(this.isInstitutional);
        this.data['name'] = JSON.stringify(this.name);

        //Optional
        this.data['view'] = 0; // 0 = false or 1 = true
        this.data['print_r'] = 0; // 0 = false or 1 = true
        let actionUrl = `${reportBackend}/pdf-generate-post`;
        bl2Js(this.data, actionUrl);
    }

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors