$scope.addTodo = function() {
var todo = new Todo();
todo.save({
text: $scope.todoText,
done: false
}, {
success: function(todoAgain) {
// use $scope.$apply inside of non-Angular functions
// in order to notify the DOM that the data has changed
$scope.$apply(function() {
$scope.todos.push({text: todoAgain.get("text"), done: todoAgain.get("done"), parseObject: todoAgain});
$scope.todoText = "";
});
},
error: function(error) {
alert("Error: " + error.code + " " + error.message);
}
});
};
Exemplo completo: https://github.com/adelevie/ParseAngularJS