I tried:
initialize: function() { if (this.get("id") == "modelOfInterest") { var func = function() {
and
initialize: function() { if (this.get("id") == "modelOfInterest") { var func = function() {
However, in both cases:
myModelInstance.func(); //object has no method func
I would prefer not to use _.bindAll() .
I edited the code above to show that I am trying to associate func with only one model. A model is initialized when it is added to the collection: all models start at the same time, and I just want to associate func with one of them.
user911625
source share