I have an idea about the skeleton that subview loads. When I load a subview, I would like to show the loader when the fetch view requires data, and hide the loader when the view is ready for rendering.
I did something like this:
var appView = Backbone.View.extend({ showLoader: function() {
My subtask is currently loading the collection and implemented as follows:
var mySubView = Backbone.View.extend({ initialize: function() { this.myCollection.fetch({ async: false }); }, render: function() {
My subview loads the collection synchronously, because this is the only way to find out when my view is βreadyβ for rendering, but I think this is not the best way to use Backbone.
What should I do?
Mickael
source share