Skip to content

Commit

Permalink
Merge pull request rstacruz#14 from spadin/master
Browse files Browse the repository at this point in the history
Compile inline template only once
  • Loading branch information
rstacruz committed Feb 9, 2012
2 parents 9093f81 + e600c92 commit d69e067
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions README.md
Expand Up @@ -142,10 +142,7 @@ view like so.
``` javascript
ContactView = Backbone.View.extend({
template: function() {
var template = _.template($("#template-contact").html());
return template.apply(this, arguments);
},
template: _.template($("#template-contact").html()),
render: function() {
// This is a dictionary object of the attributes of the models.
Expand Down

0 comments on commit d69e067

Please sign in to comment.