HELP, Failed to use ng-cordova

I guess you want to test the IAB: => Ridicoulos stupid doc of ngcordova
You used the wrong name => $cordovaInAppBrowser not $cordovaPlugin!!

here is a workflow for your tests:

  1. install ngCordova:
    bower install ngCordova
    or copy it by your selfe

  2. install the plugin:
    cordova plugin add org.apache.cordova.inappbrowser

  3. check your plugins:
    cordova plugin list

  4. check if you refered the file right in your index.html

  5. require ngCordova in your module.
    Here is an example:

    angular.module(‘modulname’, [ ‘ngCordova’])
    .controller(‘controllername’, function($scope, $ionicPlatform, $cordovaInAppBrowser) {

     var pathToSite = 'http://www.domainname.com';
     $rootScope.iabIsOpen = true;
     
     var iabDefaultSettings : {
         location : 'no',
         clearcache : 'no',
         toolbar : 'no'
         }
    

    $scope.openIAB = function(bcmsBeaconKey) {

     $ionicPlatform.ready(function() {
     
     //if is open
     if($rootScope.iabIsOpen) {
         console.log('APPTEST: iabIsOpen');
         return;
     }
     
     $cordovaInAppBrowser
     .open(pathToSite, '_blank', iabDefaultSettings)
     .then(
         // success
         function(event) {
         console.log('on $cordovaInAppBrowser:open success');
     },
     // error
     function(event) {
         //start all loops
         console.log('on $cordovaInAppBrowser:open error');
         $rootScope.iabIsOpen = false;
     });
     });
    

    });

6.check you networkconnection, IAB needs internet :wink: