I'm trying to keep a list of resources up to date as a user interacts with it. Using an AngularJS ngResource I initially grab the list using it's query
method. Each resource then has a $remove
(or $delete
) method, right? But when fired, the resource isn't removed from the list returned from query
.
This is asking a lot, I know, but I was almost hoping it would just do everything for me. Save that, how could I accomplish this. Does the resource itself emit some kind of event? Does it have a deleted property I can $watch
? How would I go about know that a resource was $remove
'd so I can splice it out of the list?
Thanks.