I am using the angular $http to call the webservice, but i can not get any data from service, the status is always 0,
var httpurl = "http://127.0.0.1:3000?orderCode=700501898";
var myApp = angular.module('piechart', []);
myApp.factory('MyService', ['$http', function ($http) {
return new function () {
this.GetName = function () {
return $http({
url: httpurl,
method:'GET'
})
};
};
}]);
angular.injector(['ng', 'piechart']).invoke(function (MyService) {
MyService.GetName();
});