Angularjs, WebServer .net

0

I am developing an application in HTML5 , angularjs , sqlserver and I am trying to consult / update my data through a web Server vb.net. but I'm having a problem when I'm going to make an inquiry.

The web server tested it and generates the requested data correctly, but when I try to consume this web server from angularjs with $http , it does not return information, however when consulting the status of the query is 200 that tells me that the query was done in a normal way.

The code portion of angularjs is as follows:

(function () {
    'use strict';
    angular.module('appLavanderia', [])
        .controller('ControlProceso', function ($scope, $http) {
            $scope.infUsuario = [];
            var httpreq = {
                method: 'POST',
                url: "http://localhost:61858/WebSQLConsultas.asmx/datosConsultas",
                headers: {
                    'ContentType': 'application/json; charset=utf-8',
                    'dataType': 'json'
                },
                data: JSON.stringify({ 'opcion': '4', 'Codigo': '00001' })
            };

            $http(httpreq).then(function mySucces(response) {
                $scope.infUsuario = response.data;
                $scope.statuscode = response.status;
            }, function myError(response) {
                $scope.myWelcome = response.statusText;
                $scope.statuscode = response.status;
                console.log(error);
                });
        })
    
asked by Lucho-59 26.08.2017 в 15:45
source

0 answers