I'm having trouble loading the controller data into Angular. I do not understand, I followed the explanation step by step and I 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'm passing through Api Web is bringing the correction data via Json, but running the application already shows the error in the description.
What's happening? Could someone explain me?