This file contains 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
/* Templates to load: */ | |
function Template(templateUrl) { | |
this.template = false; | |
this.compiledTemplate= false; | |
this.templateUrl = templateUrl; | |
this.draw = function(contents) { | |
//We compile the template if it isn't compiled yet. | |
this.compiledTemplate = this.compiledTemplate || Handlebars.compile(this.template); | |
return this.compiledTemplate(contents); |