I am new to firebase, and wondering how I can implement deleting the data in Angular view (interface), but still keep it in the Firebase database. Currently, due to the three way binding (use Firebase.remove() function), the data will be deleted in the database when it is deleted in Angular view. See in Plunker here: http://plnkr.co/edit/BBtD2YoUBHBAyhu0puXd?p=info
Here is the remove user part:
// Remove user
$scope.removeRecord = function(userId) {
var userUrl = fbURL + user_table + '/' + userId;
$scope.user = $firebase(new Firebase(userUrl));
$scope.user.$remove()
$scope.alerts.splice(0, 1);
$scope.alerts.push({
type: 'success',
msg: "User removed successfully!"
});
};
Or is that possible I can retrieve a data from Firebase based on my custom query? So maybe I can distinguish the deleted data from the existing data in Firebase database?