The documentation is a bit unclear, so your confusion is understandable. From a great guide :
Event catalog
Here is a list of all the built-in events that can trigger Backbone.js. You can also trigger your own events on models and views as you wish.
- "add" (model, collection, parameters) - when adding a model to the collection.
- ...
So, the second argument to the add handler is the collection itself. The ubiquitous options you are looking for is always the last argument, so you want:
onModelAddedd: function(model, collection, options) { console.log("options = ", options); }
Demo (open console): http://jsfiddle.net/ambiguous/Das2t/
The last argument to options implied as the last argument in the entire documentation, but it is not explicitly specified elsewhere.
mu is too short
source share