Skip to content

Instantly share code, notes, and snippets.

@lidatui
Created September 16, 2014 03:02
Show Gist options
  • Save lidatui/9db01bc37f54fd6ea3e2 to your computer and use it in GitHub Desktop.
Save lidatui/9db01bc37f54fd6ea3e2 to your computer and use it in GitHub Desktop.
AngularJS POST parameter
$http({
method : 'POST',
url : 'process.php',
data : $.param($scope.formData), // pass in data as strings
headers : { 'Content-Type': 'application/x-www-form-urlencoded' } // set the headers so angular passing info as form data (not request payload)
})
.success(function(data) {
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment