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

Collection.fetch() will call reset on success, which in turn will trigger a ‘reset’ event. Any subscribers to the collections reset event should receive the event.

The key here is “on success.” I had this problem, only to discover that backbone was silently swallowing my errors messages. Pass in an error handler that, at least, logs to console.log(), and see what’s happening:

trips.fetch({error: function() { console.log(arguments); }});

(Note: Old versions of backbone.js will trigger “refresh” instead of “reset”)

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)