In app browser, opening all links with header

Hello!

I am currently trying to open all links with the InAppBrowser plugin from cordova.

import { StatusBar, Splashscreen, GoogleAnalytics, InAppBrowser } from ‘ionic-native’;
This is my code:
declare var window: any;
declare var cordova: any;

initializeApp() {
this.platform.ready().then(() => {
StatusBar.styleDefault();
Splashscreen.hide();
if (this.platform.is(‘cordova’)) {
console.log(‘is cordova’);
window.open = (url, target?, opts?) => {
console.log(‘window.OPEN CALLED’);
(new InAppBrowser(url, ‘_blank’, ‘location=yes’));
};
//window.open = cordova.InAppBrowser.open;
}
}

My links are opening in the in app browser, but without the header. So I cannot close the in app browser in iOS because there is no back button.

Can anyone help out? It would be much appreciated!

2 Likes