Problem with ngCordova's $cordovaInAppBrowser



I am using ngCordova's $cordovaInAppBrowser to open Apple Play Store URL. It opens the app store but it does not go into .then. Relevant code:

    $, '_system', {location: 'yes', clearcache: 'yes', toolbar: 'no'}).
then(function(event) { ¬                            
      console.log("inside then"); ¬                           

mktUrl is a app store URL for an app.

It does not generate any error. But it just doesn’t work. Please help.


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 =;
var ref =, 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.