0

I don't know why is it like that. In the tutorial that I follow it says I don't need to inject anything to my app.js

any ideas?

Check this link

here's the code of my function

$scope.export = function() {
        html2canvas(document.getElementById('balanceSheet'), {
            onrendered: function(canvas) {
                var data = canvas.toDataURL();
                var docDefinition = {
                    content: [{
                        image: data,
                        width: 500,
                    }]
                };
                pdfMake.createPdf(docDefinition).download("test.pdf");
            }
        });
    }

the scripts that I imported came here

  • pdfmake.min.js
  • vfs_fonts.js

html2calvas, pdfMake, and onrendered shows they have an error

see image of it Code

do I need to inject something or what?

by the way this is a single page application

Mark
  • 293
  • 1
  • 11
  • 25

0 Answers0