Quantcast
Channel: Ionic Forum - Latest posts
Viewing all articles
Browse latest Browse all 228595

Problem with ngCordova's $cordovaInAppBrowser

$
0
0

The inAppBrowser open function does not return a promise so you can't use .then

You could create a event listener like they show in the documentation https://github.com/apache/cordova-plugin-inappbrowser

window.open = cordova.InAppBrowser.open;
var ref = window.open(url, target, options);
ref.addEventListener('loadstop', function() {
    //do something
});

This event listener would fire when the inAppBrowser has finished loading the page. You can also use 'loadstart' if you want the listener to fire when the loading starts.

Hope this helps.


Viewing all articles
Browse latest Browse all 228595

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>