Commit a67903a1 authored by smelnikov's avatar smelnikov

suppresses 'add' events with {reset: true}

parent 31c25032
......@@ -39,6 +39,9 @@ var app = app || {};
this.listenTo(app.todos, 'filter', this.filterAll);
this.listenTo(app.todos, 'all', this.render);
//suppresses 'add' events with {reset: true} and prevents the app view
//from being re-rendered for every model.
//Only renders when the 'reset' event is triggered at the end of the fetch.
app.todos.fetch({reset: true});
},
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment