Skip to content

Instantly share code, notes, and snippets.

@randallknutson
Created November 3, 2016 18:01
Show Gist options
  • Save randallknutson/56b8c2335de6cb324f41aa8d510846b5 to your computer and use it in GitHub Desktop.
Save randallknutson/56b8c2335de6cb324f41aa8d510846b5 to your computer and use it in GitHub Desktop.
// Place this inside the page's controller for a form
// You'll need to inject $http and $scope into the controller.
$scope.$on('formSubmission', function(err, submission) {
$http({
method: 'POST',
url: 'http://mydomain.com/mypath',
eaders: { 'Content-Type': 'application/json' },
data: submission.data,
disableJWT: true
});
});
// The service you are posting to must have CORS enabled and configured or the browser will block this request.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment