What events are triggered when calling fetch() on a Backbone.js collection?

后端 未结 3 463
孤城傲影
孤城傲影 2020-12-13 12:07

In my backbone.js app, there is a Trips collection that holds Trip models, which is working with LocalStorage. I am able to call

3条回答
  •  星月不相逢
    2020-12-13 12:38

    If you are using backbone 1.0, you'll need to pass reset:true in the fetch() call in order to bind with the reset event:

    trips.fetch({reset: true});
    

提交回复
热议问题