I am trying to consume a webservice(Get method )in angularjs.
I have written the code in controller using $http. But, i am not getting any response back, and also i am not sure whether it had hit the URL or not.
All the Corrections or suggestions about the below code are welcome.
(function() { 'use strict';
angular
.module('ilSaasApp')
.controller('HomeController', HomeController);
HomeController.$inject = ['$scope', 'Principal', 'LoginService', '$state', '$http'];
function HomeController ($scope, Principal, LoginService, $state, $http) {
function userinfo(){
alert("Hello");
$http.get('http://52.38.106.96/Test_Service/WDS_SERVICE.svc/userregistrationbymultipleuseridsforapp/UserIDs?UserIDs=931')
.then(function(response) {
alert("Inside fun");
$scope.data = response.data;
});
}
}
})();