Are these two steps mandatory to delete a Model?
var model = collection.get(id);
model.destroy();
collection.remove(model);
Isn’t there a way to destroy a model when it is removed from its collection?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Removing a model from a collection triggers the
"remove"event.So if you want to, you can get models to bind to them and destroy themselves.