$scope.submitNewUser = function() {
$http({
method: 'POST',
url: 'api/user/signup',
data: {'user': $scope.user},
headers: {'Content-Type': 'application/x-www-form-urlencoded'},
}).success(function(data, status, headers, config) {
console.log('hello');
alert('boo');
});
}
The code snippet above is supposed to execute a POST request, but I am facing an issue where the .success()
part is not functioning properly. The callback functions like console.log()
and alert()
are not triggering as expected.
Any assistance on this matter would be greatly appreciated. Thank you!