Coder Social home page Coder Social logo

ngcordovahttp's People

Contributors

panta avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

ngcordovahttp's Issues

Angular Invoking error

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.

compatible with angular http

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.

cordovaHTTP is not defined

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>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.