Closed nikgraf closed 13 years ago
Why not just mate the tempalte function: function myNOPtemplateFunction(str) { return str; } ?
Jammit has always supported template_function: off
, as a way to pass through template strings unaltered ... and this is documented on the homepage. I've made it a bit more obvious at SHA: 7d7b1c3bc15e08dd7c761e18a7c7e061ad14d7c5
Thanks! Didn't know about this.
I used jammit for some smaller projects in combination with backbone, underscore and jquery-tmpl and I would like to share a small idea. I would propose to remove the concept of a template_function and instead creating a namespace with strings for the javascript templates.
This give the developers more flexability. For example with jquery-tmpl developers would be able to use .tmpl() and $.tmpl() or even .template(). Afaik currently this is not possible.
The namespace could look like
FolderStructure
templates/foo.html templates/bar/a.html templates/bar/b.html
Object
I'v never used _.template or mustache and mabye i missed something and i'm wrong with this approach. Please tell me what you think about this.