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 badges1 Answer
Reset to default 4found it! I missed to import of the pdfMake plugin in my home html file.
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745175035a4615146.html
评论列表(0条)