Here my flow...
I added both ios and android
platform
Installed it cordova plugin add cordova-plugin-themeablebrowser
My example pdf : http://www.pdf995.com/samples/pdf.pdf
that plugin in github: https://github.com/initialxy/cordova-plugin-themeablebrowser
My index.html
:
<ion-pane>
<ion-header-bar class="bar-stable">
<h1 class="title">Ionic Blank Starter</h1>
</ion-header-bar>
<ion-content ng-controller="FileOpenerController">
<button class="button button-icon loginnavbtn" ng-click="openpdf()">pdf open</button>
</ion-content>
</ion-pane>
my .js
app.controller('FileOpenerController', function($scope, $ionicPlatform,$themeablebrowser) {
var options = {
toolbar: {
height: 44,
color: '#cdcdcd'
},
title: {
color: '#003264ff',
showPageTitle: true
},
closeButton: {
image: 'close',
imagePressed: 'close_pressed',
align: 'left',
event: 'closePressed'
},
backButton: {
image: 'back',
imagePressed: 'back_pressed',
align: 'left',
event: 'backPressed'
},
forwardButton: {
image: 'forward',
imagePressed: 'forward_pressed',
align: 'left',
event: 'forwardPressed'
},
closeButton: {
image: 'close',
imagePressed: 'close_pressed',
align: 'left',
event: 'closePressed'
},
menu: {
image: 'menu',
imagePressed: 'menu_pressed',
title: 'Select for quick menu',
cancel: 'Cancel',
align: 'right',
items: [
{
event: 'btn1Pressed',
label: 'Button1'
},
{
event: 'btn2Pressed',
label: 'Button2'
}]
};
}
function openpdf() {
// dont know how to call my pdf url....not able to get the correct code...
}
});
I have few doubts.
Does my $themeablebrowser
is corrrect that i have defined in app.controller
.
don't know how to code inside my click
method to open my pdf in Themeable url
Thanks in advance