I am new to AngularJS. I am trying to post data to a local server. Below is the code.
        var postObject = new Object();
        postObject.email = "emailtobesaved1";
        postObject.userData ="userDatatobeSaved";
        var s=JSON.stringify(postObject);
        $http({
            url: 'http://localhost:8080/people',
            dataType: 'json',
            method: 'POST',
            data: s,
            headers: {
                "Content-Type": "application/json"
            }
        }).success(function(response){
            $scope.response = response;
        }).error(function(error){
            $scope.error = error;
        });
This data is not posted. Am I missing something? I activated proper CORS filter in the server side. Server side is a Spring boot application.
Thanks in advance.
 
    