Backbone.js updating of models in a collection

后端 未结 5 1327
天涯浪人
天涯浪人 2021-01-30 11:47

Let\'s say you are building a Twitter clone with Backbone.js. You have a collection of tweets. Each tweet is obviously an instance of the Tweet model.

You create an inst

5条回答
  •  面向向阳花
    2021-01-30 12:30

    I'm not sure if this was possible back in March as I only recently started using backbone. But a better solution may be to pass standard jQuery options into Collection.fetch.

    this.collection.fetch({data: {last_tweet: last_teet_id}});
    

    Check out the jQuery documentation for a full list of parameters.

提交回复
热议问题