Last active
December 19, 2015 02:38
-
-
Save jimrubenstein/5884577 to your computer and use it in GitHub Desktop.
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
Views = { | |
render: function(template, data) | |
{ | |
if (undefined == JST) | |
{ | |
throw new Error("JST Templates unavailable"); | |
} | |
if (undefined == JST[ template ]) | |
{ | |
throw new Error("JST template " + template + " undefined"); | |
} | |
return JST[ template ]( data ); | |
}, | |
render_fn: function(template) | |
{ | |
return function(data) | |
{ | |
return Views.render(template, data); | |
} | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment