Hi,
I m using the locally hosted WCF REST service which was working fine with VS2013 and Cordova and suddenly getting the error when running ripple .
To call the service.. i m using ANGULARJS factory design pattern .
now throwing this error ..
<big>Failed to load resource: net::ERR_CONNECTION_REFUSED</big>
and Detail is here
OPTIONS http://localhost:4400/ripple/xhr_proxy?tinyhippos_apikey=ABC&tinyhippos_rur…Serv.svc/userlogin%3FId%3D352373057521820%26UserName%3Dsrk%26Password%3Ds net::ERR_CONNECTION_REFUSEDripple.js:50 ripple.define.object.(anonymous function)angular.js:9814 (anonymous function)angular.js:9615 sendReqangular.js:9331 $get.serverRequestangular.js:13170 processQueueangular.js:13186 (anonymous function)angular.js:14383 $get.Scope.$evalangular.js:14199 $get.Scope.$digestangular.js:14488 $get.Scope.$applyangular.js:22954 (anonymous function)jquery-2.1.3.js:4430 jQuery.event.dispatchjquery-2.1.3.js:4116 jQuery.event.add.elemData.handle
And Here is mine factory code..
'use strict';
var app = angular.module('app');
app.factory('authorize', function ($http) {
return {
validateUser: function (credential) {
//return $http.get('http://localhost:1097/TestServ.svc/userlogin?Id=' + credential.id+ '&UserName=' + credential.username + '&Password=' + credential.password + '');
return $http.get('http://localhost:1097/TestServ.svc/userlogin?Id=12345&UserName=srk&Password=s');
}
};
});
AND CONTROLLER Code is here
app.controller('LoginCtrl', function ($scope, $location, $window, authorize) {
$scope.username = '';
$scope.password = '';
$scope.id = '123456';
$scope.login = function () {
var username = $scope.username;
var password = $scope.password;
var id= '123456';
var credential = {};
credential.username = username;
credential.password = password;
credential.id= id;
if (username == '' || password == '') {
alert('Enter username and password...');
}
else {
var promiseGet = authorize.validateUser(credential);
promiseGet.then(function(pl) {
var log = pl.data;
angular.forEach(log, function (value, key) {
// this.push(key + ': ' + value);
console.log('valuesGot- ' + key + ': ' + value);
});
$location.path('/dashboard');
},
function (errorPl) {
alert('failure loading Employee ..' + errorPl);
}
);
}
};
});
Best Regards,
Sutotpal