title: Howto integrate HockeyApp in Ionic as a Module
body: <p>i'm trying to integrate hockeyapp as a module like in this topic :
  <a href="https://stackoverflow.com/questions/27632658/how-to-integrate-hockey-app-with-hybrid-mobile-app">How to integrate hockey App with Hybrid mobile app</a></p>
  
  <p>But i'm unable to make it work. I've added the cordova plugin <a href="https://github.com/peutetre/cordova-plugin-hockeyapp" rel="nofollow noreferrer">https://github.com/peutetre/cordova-plugin-hockeyapp</a>. it seem successfully integrated (when i'm building the app, the source are present), but i'm unable to use it.</p>
  
  <p>I'm a beginner with ionic, i've tried different thing, but none worked.</p>
  
  <p>the last i've tried it to make a module like this :</p>
  
  <pre><code>    angular.module('ngHockeyApp', [])
  
  .factory('hockeyapp', function ($q, $window) {
  
      function start(success, failure, appid) {
          console.log('start');
          var deferred = $q.defer();
          cordova.exec(success, failure, "HockeyApp", "start", [ appid ]);
          return deferred.promise;
      }
  
      ...
  
      return {
          start: start,
          feedback: feedback,
          forceCrash: forceCrash,
          checkForUpdate: checkForUpdate
      };
  
  });
  </code></pre>
  
  <p>in this case, the problem is that it cannot resolve cordova, so it cant make call to native code.</p>
  
  <p>Anyone having integrated HockeyApp in ionic can help?</p>
  
  <p>Thanks</p>