Quantcast
Channel: Ionic Forum - Latest posts
Viewing all articles
Browse latest Browse all 228595

Creating PDF Docs in Ionic using pdfMake.org

$
0
0

It looks like your .runReport call happens outside of the .getPicture promise execution. Code flow probably continues to the .runReport with an empty or non-existent .imgData attribute on the $scope. Then, the image is returned and imgData is set. Can you either set a breakpoint on the .runReport line and check the $scope.imgData? Or, can you console.log the $scope.imgData in the .runReport method to see what is in there?

My guess is that you need to call the .runReport after setting the .imgData inside of the .then() block. Or, you could broadcast an event on the $rootscope, like 'camera:image_received', and wire a listener in the controller. I prefer using events like this in cases of aync operation.


Viewing all articles
Browse latest Browse all 228595

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>