Search code examples
cordovaionic2ionic3cordova-plugins

OverAppBrowser for Ionic


Recently i saw this plugin: https://www.npmjs.com/package/koein-cordova-plugin-overappbrowser

But its difficult to guess how to integrate in ionic or cordova since there is no ionic wrapper for it.

I tried:

declare let window: any;

if (window.cordova) {...}

but their sample code won't work.

Has anyone used or integrated this OverAppBrowser or is familiar with integration of it? I need alternative to InAppBrowser that can actually be rendered over the ionic view or set its height


Solution

  • window is a global variable that represents the current window in which the script is running. You do not need to declare it. Since you're using it in a cordova application, the proper syntax will be :

    (<any>window).oab = new OverAppBrowser(xxx);
    

    Use to keep the window dynamic.