

Var ref = ('assets/foo.pdf', '_blank', 'location=no') Here's the HTML:ĭocument.addEventListener('deviceready', init, false) ĭocument.querySelector('#loadPDF1').addEventListener('touchend', loadPDF1,false) ĭocument.querySelector('#loadPDF2').addEventListener('touchend', loadPDF2,false)

To be clear, I expected both 1 and 2 to act the same, but I figured I might as well be complete and check it out. Even though I'm "All Ionic, All the Time", I specifically avoided it in this case to keep my code as simple as possible. As usual, what I thought would be rather simple turned into anything but that.įirst, I whipped up a super quick, super minimal Cordova application. I know that PDFs, in general, "just work" on both Android and iOS, but I was specifically curious about how you would use PDFs within a Cordova app. In today's "I wonder what happens when." post, I decided to take a look at what happens when you try to use a PDF with a hybrid mobile application.
