What's wrong on this?
var modulo = angular.module('SWAApp', []);
modulo.controller('SWAAllocationController', ['$scope','$http', function RunSWAAllocation($scope,$http) {
$scope.LaunchAllocation = function RunSWAAllocation($scope, $http) {
$http.get('/MP3_SIOP/WS/SWAService.svc/PostSWAAllocation')
.success(function (data) {
pvt_BindHeaderData($scope, data);
alert("SWA Allocation OK");
})
.error(function (data, status) {
alert("Si è verificato un errore nel dei dati!")
});
}
}]);
and
<div class="row" ng-controller="SWAAllocationController">
<button type="button" ng-click="LaunchAllocation()">Run Allocation </button> ...
This give me $http undefined (and also $scope)
Thank a lot for your help.
PS: Sorry if I miss something or made something wrong, this is my first question and I'm not skilled on AngularJS