Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如果我调用 Backbone.Collection.reset() 它会破坏()集合中的每个模型还是它们仍然保存在内存中?
它不会调用.destroy()每个模型,这会很奇怪。该destroy()方法通常调用DELETEajax 请求,并且.reset()不会将数据同步到服务器,它会清除集合,所以如果集合是唯一存储模型的地方,我们可以说他们还没有留在记忆中
.destroy()
destroy()
DELETE
.reset()