Skip to content

Commit

Permalink
adding a 'listenTo' example to the main View docco.
Browse files Browse the repository at this point in the history
  • Loading branch information
jashkenas committed Dec 13, 2012
1 parent 5342d3d commit 9b97cc3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2375,6 +2375,10 @@ <h2 id="View">Backbone.View</h2>
"click .button.delete": "destroy"
},

initialize: function() {
this.listenTo(this.model, "change", this.render);
}

render: function() {
...
}
Expand Down

0 comments on commit 9b97cc3

Please sign in to comment.