I am trying to implement HTTPS(with server certificate, placed in platform->android->asset as defined in cordova-HTTP plugin documention) web service for Hybrid application.I have successfully added the cordova plugin for android platform.I have loaded the module in my app.js:
angular.module('app', ['ionic', 'app.controllers', 'app.routes', 'app.services', 'app.directives'])
Now i am trying to use it in controller.js
angular.module('app.controllers', ['cordovaHTTP'])
.controller('loginScreenCtrl', function($scope) {
console.log('inside Test App controller');
$scope.ShowAlert = function() {
console.log('inside onButtonClick');
cordovaHTTP.enableSSLPinning(true, function() {
console.log('success!');
}, function() {
console.log('error :(');
});
but i have got "Failed to instantiate module app.controllers due to: Error: [$injector:modulerr] Failed to instantiate module cordovaHTTP due to: Error: [$injector:nomod] Module 'cordovaHTTP' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument." exception
Let me know any suggestion for the same