From 978708890b54b2997c72321be679686799c8d299 Mon Sep 17 00:00:00 2001 From: Sai Krishna Date: Wed, 29 Oct 2014 10:27:34 +0000 Subject: [PATCH] Exporting http object to use it through clobbers target defined in plugins.xml. Doing this helps in using the plugin through ngCordova, a much better way of using Cordova plugins from Angular. --- www/cordovaHTTP.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/www/cordovaHTTP.js b/www/cordovaHTTP.js index 0b5e64b..a879e20 100644 --- a/www/cordovaHTTP.js +++ b/www/cordovaHTTP.js @@ -63,6 +63,8 @@ var http = { } }; +module.exports = http; + if (typeof angular !== "undefined") { angular.module('cordovaHTTP', []).factory('cordovaHTTP', function($timeout, $q) { function makePromise(fn, args, async) { @@ -126,4 +128,4 @@ if (typeof angular !== "undefined") { }); } else { window.cordovaHTTP = http; -} \ No newline at end of file +}