javascript - Using pdfmake - generate pdf tool in AngularJS - Stack Overflow

Using 'bower install pdfmake'I've downloaded the relevant files in order to work with p

Using 'bower install pdfmake' I've downloaded the relevant files in order to work with pdfMake.

I want to work with this library in angular.

This is my sample code

angular controller:

    $scope.pdfMaker = function(){
        var docDefinition = { content: 'This is an sample PDF printed with pdfMake' };
        pdfMake.createPdf(docDefinition).open();
    }

html:

 <button ng-click="pdfMaker()">run pdf</button>

What am I missing? why this does not working?

Using 'bower install pdfmake' I've downloaded the relevant files in order to work with pdfMake.

I want to work with this library in angular.

This is my sample code

angular controller:

    $scope.pdfMaker = function(){
        var docDefinition = { content: 'This is an sample PDF printed with pdfMake' };
        pdfMake.createPdf(docDefinition).open();
    }

html:

 <button ng-click="pdfMaker()">run pdf</button>

What am I missing? why this does not working?

Share Improve this question edited Dec 11, 2014 at 21:00 john Smith asked Dec 9, 2014 at 20:13 john Smithjohn Smith 1,6058 gold badges37 silver badges54 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 4

found it! I missed to import of the pdfMake plugin in my home html file.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745175035a4615146.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信