Created
October 1, 2015 05:36
-
-
Save RubyRonin/bf8e8f4baccf85c057d8 to your computer and use it in GitHub Desktop.
$apply?
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.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