Skip to content

Instantly share code, notes, and snippets.

@Haraldson
Created October 4, 2013 09:39
Show Gist options
  • Save Haraldson/6823471 to your computer and use it in GitHub Desktop.
Save Haraldson/6823471 to your computer and use it in GitHub Desktop.
// Sanitizing the data – it’s exactly the same coming from cache or from the API at the point where it’s set into the model
this.model
.set(data)
.trigger('change');
// In the initialize function
this.model.on('change', this.render, this); // this works
this.model.on('change', this.renderSubViews, this); // this does not even fire
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment