Backbone.js progress bar while fetching collection

前端 未结 6 639
既然无缘
既然无缘 2021-02-09 10:43

i\'d like to show a progress bar while i update the app with fresh content. I guess the best thing to do would be to do it while calling .fetch on a collection.

The cont

6条回答
  •  情书的邮戳
    2021-02-09 11:16

    When you call fetch put up your loading bar.

    Then pass a function as options.success to the fetch method (docs) that takes it the screen.

    Or, when you render your objects to the screen you can pull it down then.

    We use this for one of our views and just pull it off using the options.success method

提交回复
热议问题