angular - How to pass data through JSON to jsPDF autotable -


download() {     var columns = [         { title: "producto", datakey: "producto" },         { title: "fecha", datakey: "fecha" }     ];     var data = [{ "producto": "ddf", "fecha": "cwx" }];     var doc = new jspdf('p', 'pt');     console.log("1", data);     console.log("2", columns);     doc.autotable(columns, data);     doc.save('table.pdf');                 //console.log("3", data);     //this.pdfserviceservice.getall().subscribe(c => {     //    console.log("4", this.country = c.pdfdata)     //    this.data = this.country;     //});   };  <button (click)="download()">generate pdf</button> 

i want pass data (var data) through json data. i'm not able pass data doc auto table. link have tried: https://www.npmjs.com/package/jspdf-autotable


Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -