I've stumbled across something quite strange
I'm fetching a collection, and listening on the reset event, but somehow the event is lost
I have this minimal example:
$(function() {
var collection = new Backbone.Collection();
collection.url = 'http://localhost:9000/api/Usuario';
collection.on('reset', function() {
console.log('collection reset!');
});
collection.fetch();
});
Inspecting the network I can see that the request is seuccessful, and the web service returns json data
But there's no way that the cosole.log('collection reset!') callback is executed.
There must be something really silly that I'm missing...