я сделал, но получил ошибку в браузере
мой поток ...
Я добавил обаios and android
Платформа
Установил егоcordova plugin add cordova-plugin-themeablebrowser
Мой пример pdf:http://www.pdf995.com/samples/pdf.pdf
этот плагин в github:https://github.com/initialxy/cordova-plugin-themeablebrowser
мой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>
мой.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...
}
});
У меня мало сомнений.
Делает мой$themeablebrowser
правильно, что я определил вapp.controller
.
не знаю, как кодировать в моемclick
способ открыть мой PDF вThemeable url
заранее спасибо