panta / ngcordovahttp Goto Github PK
View Code? Open in Web Editor NEWAngularJS module wrapper for cordovaHTTP Cordova HTTP plugin.
License: MIT License
AngularJS module wrapper for cordovaHTTP Cordova HTTP plugin.
License: MIT License
Currently receiving this error:
Error: [$injector:strictdi] function($timeout, $q) is not using explicit annotation and cannot be invoked in strict mode
Now I looked into it, but it looks like your invocation is correct. You may have to do a explicit $inject though... I'll let you know what I find.
Hi,
here is the docu for angualrs default http mechanism: https://docs.angularjs.org/api/ng/service/$http
We know, there is no support for SSL-Pinning. It will be perfect, if ngCordovaHttp will be compatible(used in same way) with it.
I mean something like this. See here described in pseudocode:
var http = $http;
if (typeof cordova !== "undefined") {
http = cordovaHTTP;
http.enableSSLPinning(true);
}
http({method: $scope.method, url: $scope.url, cache: $templateCache}).
success(function(data, status) {
$scope.status = status;
$scope.data = data;
}).
error(function(data, status) {
$scope.data = data || "Request failed";
$scope.status = status;
});
So it will be possible to handle ngCordovaHttp in environments with cordova (android,ios) and the angular-http in browser (for example in development) in same way.
thx.
I'm working with http request.
i use this plugin
https://github.com/panta/cordova-HTTP
angular.module('starter', ['ionic', 'starter.controllers', 'starter.services','ngCordova','ja.qr','ngStorage','ngCordovaHTTP'])
.run(function($ionicPlatform,$rootScope,$localStorage) {
$ionicPlatform.ready(function() {
// Hide the accessory bar by default (remove this to show the accessory bar above the keyboard
// for form inputs)
console.log(cordovaHTTP);
It's throw cordovaHTTP is undefined..
In index.html
<script src="lib/ionic/js/ionic.bundle.js"></script>
<script src="lib/ngCordova/dist/ng-cordova.js"></script>
<script src="js/ng-cordova-http.js"></script>
<!-- cordova script (this will be a 404 during development) -->
<script src="cordova.js"></script>
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.