How to call web service with AngularJS on checkbox change event. here is my code
angular.module('myApp', []).controller('checkBoxCtrl', ['$scope', function ($scope) {
$scope.SelectedMobileCateg = function () {
alert($scope.SelectedMobID);
debugger;
angular.module('myApp', []).controller("ProductController", function ($scope, $http) {
$http.get('http://localhost:50622/api/GetMobile/getMobiles').
success(function (data) {
$scope.products = data;
debugger;
}).
error(function (data) {
debugger;
alert("erro");
});
});
};
}]);
I will be very thanks full to you
successanderroron the $http service is deprecated since they don't return a promise and thus doesn't chain. Usetheninstead.