I saw some tutorial, in ionic 2 to open the pdf which should not be downloadable to user. So i found this Git hub repo.
Now when I download the project and when I run the sample app.. the pdf is not opening in themeableBrowser
..
It has all browser feature like :
inAppBrowser
themeableBrowser
AndroidPDF
But when I tried inAppBrowser
it works fine. But I need to work with themeableBrowser
becasue i need a pdf should not be a downloadable. if any one clear this issue of mine why this is not opening in android platform.
you can download the repo and you can use that.
please help me out. its a only source that i found to work.. Thanks
As stated on the ionic docs you can use this
themeablebrowser
which is same as the cordova themeablebrowser you are trying to use.Here is the working code snippet:
In
home.html
file:In
home.ts
file:And in
app.module.ts
file addThemeableBrowser
from@ionic-native/themeable-browser
to the providers.After adding your
app.module.ts
file should look like:Thats all the additions you need in your started ionic app for your themeable browser to work.
Tested it on android emulator.