Skip to content

Instantly share code, notes, and snippets.

@rightson
Created June 24, 2012 23:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rightson/2985477 to your computer and use it in GitHub Desktop.
Save rightson/2985477 to your computer and use it in GitHub Desktop.
Person = Backbone.Model.extend({
initialize: function() {
console.log("hello world!");
this.bind("change:name", function() {
console.log(person.get('name'));
});
}
//...
});
@hechien
Copy link

hechien commented Dec 15, 2012

Don't use person.get('name');

Use this.get('name'); instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment