Is it possible to batch remove items from a firebase array using .$remove?
I'm currently working on an app with a chat function in which I'd like to
automatically delete chat messages once the chat message list becomes a
certain length.
Ideally, I'd do it like this (if, for example, I wanted the messages list
only 5 messages long):
if ($scope.messages.length > 5) {
$scope.messages.$remove($scope.messages.length - 5, $scope.messages.length
);
}
Please help! I've tried everything...
--
You received this message because you are subscribed to the Google Groups "Firebase + AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-angular+unsubscribe@googlegroups.com.
To post to this group, send email to firebase-angular@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-angular/74c24173-ca53-4d65-a63c-c4ec80198606%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.