Skip to content

Instantly share code, notes, and snippets.

@RubyRonin
Created October 1, 2015 05:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RubyRonin/bf8e8f4baccf85c057d8 to your computer and use it in GitHub Desktop.
Save RubyRonin/bf8e8f4baccf85c057d8 to your computer and use it in GitHub Desktop.
$apply?
$scope.contactgrab = function () {
$cordovaContacts.pickContact().then(function (contactPicked) {
$scope.contact = contactPicked;
// Parse.User.current().then(function() {
Parse.User.current().set('draftpick', $scope.contact.displayName);
// });
Parse.User.current().save(null,{
success: function(){
$scope.$apply(); // not yet tested
alert("added");
},
error: function(error){
alert("Error: " + error.code + " " +error.message);
}
});
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment