问题描述
- backbone的collection的create方法的疑问?
-
API解释:
Creating a model will cause an immediate "add" event to be triggered on the collection, a "request" event as the new model is sent to the server, as well as a "sync" event, once the server has responded with the successful creation of the model.
从这段解释中能看出来触发的sync这个方法是collection的还是model的?我英语不太好,感觉这个描述不是很清楚啊。
根据:http://www.cnblogs.com/nuysoft/archive/2012/03/19/2404274.html的图示,似乎调用的是collection的sync方法,但是我没检测到有调用
解决方案
http://www.cnblogs.com/linjiqin/p/3723936.html
解决方案二:
backbone>>collection
时间: 2024-11-24 18:59:02