Fetching contributors…
Cannot retrieve contributors at this time
41 lines (23 sloc) 852 Bytes

template

Compiles templates into strings

Properties

template.settings

    Describe: By default, uses ERB-style template delimiters, change the following template settings to use alternative delimiters.


Methods

template(text, data, settings)

    Describe: Compiles templates into strings

    Example:

template("hello <%= foo %>", {foo:"modjs"}) // => hello modjs

template.registerHelper(name, helper)

    Describe: Helpers can be accessed from any context in a template

    Example:

 template.registerHelper("echo", function(val){
     console.log(val);
 })