From 1857152aa2ee06f12a6860e7e6f069df96017bac Mon Sep 17 00:00:00 2001 From: Chris Brackert Date: Tue, 15 Sep 2015 19:53:54 -0700 Subject: [PATCH] Fix template compilation with variables --- _posts/2011-01-28-what-is-a-view.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_posts/2011-01-28-what-is-a-view.md b/_posts/2011-01-28-what-is-a-view.md index a2823324..3a3215a9 100644 --- a/_posts/2011-01-28-what-is-a-view.md +++ b/_posts/2011-01-28-what-is-a-view.md @@ -145,7 +145,7 @@ _Using template variables_ //Pass variables in using Underscore.js Template var variables = { search_label: "My Search" }; // Compile the template using underscore - var template = _.template( $("#search_template").html(), variables ); + var template = _.template( $("#search_template").html())( variables ); // Load the compiled HTML into the Backbone "el" this.$el.html( template ); },