Created
August 15, 2017 16:59
-
-
Save kauffmanes/435efcbaa1b985ada920c61244bbec76 to your computer and use it in GitHub Desktop.
Submit function
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$scope.submit = function () { | |
//Validation/parsing of input could go here | |
//Make service call | |
$http({ | |
method: 'POST', | |
url: '/forms', | |
data: $scope.formData | |
}).then(function (res) { | |
//success handler | |
})['function'](function (err) { | |
//error handler | |
}) ; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment