$cordovaInAppBrowser route automatically to the home

Hi,

i’m using $cordovaInAppBrowser to open an external link inside my App.
Everything is working fine but when i close the inAppBrowser, my app route automatically to the home.
How can i prevent this?
When i close the inAppBrowser i want to come back in my last view of the app.
This is my code:

      var options = {
          location: 'yes',
          closebuttoncaption: 'torna indietro',
          clearcache: 'no'
      };
      $scope.outLink = function (url) {
         $cordovaInAppBrowser.open(url, '_system', options)
              .then(function (event) {
                  // success
              })
              .catch(function (event) {
                  // error
              });
      };

Not sure if you still have this problem. If so, or for anyone else annoyed by this, my approach was to use $state (inject into controller) when the in-app browser is exiting - like so:
var ref = cordova.InAppBrowser.open(url, '_blank', 'location=yes'); ref.addEventListener('exit', function() { $state.go('app.page', {your_route_param: $scope.some_scope_variable}, {reload: true}); });

Hope this helps anyone
Shi