Created
July 25, 2014 02:26
-
-
Save cognitom/960b846a9cd435254e26 to your computer and use it in GitHub Desktop.
Call a cloud function on Parse.com from AngularJS
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
.controller 'SampleController', ($scope, $http) -> | |
$scope.data = [] | |
$http | |
method: 'post' | |
url: 'https://api.parse.com/1/functions/sample_function' | |
headers: | |
'X-Parse-Application-Id': APP_ID | |
'X-Parse-REST-API-Key': API_KEY | |
'Content-Type': 'application/json' | |
data: {} | |
.success (data, status) -> | |
$scope.data = data |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment