unable to hide
I am getting error as ref.hide is not a function
See my code.
var ref = cordova.ThemeableBrowser.open('abc.com', '_blank', {
statusbar: {
color: '#ffffffff'
},
toolbar: {
height: 44,
color: '#004387'
},
title: {
color: '#ffffffff',
showPageTitle: true
},
customButtons: [
{
wwwImage: 'img/home.png',
wwwImagePressed: 'home_pressed',
align: 'right',
event: 'homePressed'
}
],
backButtonCanClose: true,
hidden:true
});
ref.addEventListener('loadstart', function (e) {
$ionicLoading.show({ template: '
Please wait...
' }); }); ref.addEventListener('loadstop', function (event) { ref.show(); $ionicLoading.hide(); }); ref.addEventListener('homePressed', function (event) { ref.hide(); // I am getting error as ref.hide is not a function });
Any update..??
I am getting the same error when trying to hide the browser.
I noticed that there is no setting/way to show a loading bar while navigating in the browser so I decided to hide the browser, show loading bar and show back after loadstop. I am getting the same error when I do so.
to anyone interested, pull request #133 solves this.
Please check below code this works proper for me.
`var ref = cordova.ThemeableBrowser.open('https://abc.com', '_blank', {
statusbar: {
color: '#ffffffff'
},
toolbar: {
height: 44,
color: '#004387'
},
title: {
color: '#ffffffff',
showPageTitle: true
},
customButtons: [
{
wwwImage: 'img/whitehome.png',
wwwImagePressed: 'home_pressed',
align: 'right',
event: 'homePressed'
}
],
backButtonCanClose: true,
hidden: true
});
ref.addEventListener('loadstart', function (e) {
console.log('started');
$ionicLoading.show({ template: '
Please wait...
' }); });
ref.addEventListener('loadstop', function (event) {
ref.show();
$ionicLoading.hide();
console.log('loadstop');
});
ref.addEventListener('loaderror', function (e) {
console.log('error while loading');
$ionicLoading.hide();
});
ref.addEventListener('homePressed', function (event) {
$ionicLoading.hide();
ref.close();
$rootScope.indexSlide = "0";
$state.reload();
// $state.go('app.qrcodePage');
});
// $ionicSlideBoxDelegate.next();
}`
hello in plugin you need to change the type of hidden: string to -> hidden: boolean

it works for me (y)
node_modules/@ionic-native/themeable-browser/index.d.ts
update ThemeableBrowserOptions update to this
hidden?: boolean;
clearcache?: boolean;
clearsessioncache?: boolean;
should make an PR on ionic native