This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Fetch the template HTML from the DOM, hand it over to `Underscore.template`, | |
// assign some variables, and set up a `partial` method. | |
var template = $("#tmpl-main-section").html(), | |
compiledTemplate = _.template( template, { | |
models: aCollectionOfThings, | |
// See template examples below on usage. It's all very complex. | |
partial: function( partialName, variables ) { | |
return _.template( | |
$( "#tmpl-" + partialName ).html(), |