mirror of
https://github.com/silkimen/cordova-plugin-advanced-http.git
synced 2024-10-06 09:12:13 +08:00
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.
This commit is contained in:
parent
4fc676cc67
commit
978708890b
4
www/cordovaHTTP.js
vendored
4
www/cordovaHTTP.js
vendored
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user