1
I’m having trouble uploading data from controller in Angular. I’m not understanding, I followed step by step the explanation and mine gave this error.
var app = angular.module('app', []);
app.controller('clienteController', ['$scope', '$http', clienteController]);
function clienteController($scope, $http) {
$http.get("http://localhost:26633/api/ClientesWebApi/GetCliente")
.success(function (data) { $scope.listaclientes = data; })
.error(function () { $scope.erro = "Não foi possivel carregar a listagem de clientes."; });
}
The link I am passing via Web Api is bringing the correct data via Json, but when running the application already shows the error in the description.
What is going on? Could someone explain to me?