Permalink
Browse files

adding a 'listenTo' example to the main View docco.

  • Loading branch information...
1 parent 5342d3d commit 9b97cc3442105c42e79fc3ce78973db2afb30f8b @jashkenas jashkenas committed Dec 13, 2012
Showing with 4 additions and 0 deletions.
  1. +4 −0 index.html
View
4 index.html
@@ -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() {
...
}

0 comments on commit 9b97cc3

Please sign in to comment.