From e600c92b0eb83a5157ed9b68da2424283cd7ba42 Mon Sep 17 00:00:00 2001 From: Sandro Padin Date: Thu, 9 Feb 2012 13:42:09 -0600 Subject: [PATCH] Compile inline template only once rather than every time it's used. --- README.md | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/README.md b/README.md index 0592e5e..516fe7f 100644 --- a/README.md +++ b/README.md @@ -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.