The example from https://github.com/janl/mustache.js documentation does not 
seem 
to work in Couchdb.  Any clues?
function(head, req) {
    start({
        "headers": {
            "Content-Type": "text/html"
        }
    });
var mustache = require("lib/mustache");var view = {a_object: {title: 'this is 
an 
object',description: 'one of its attributes is a list',a_list: [{label: 
'listitem1'}, {label: 'listitem2'}]}};var template = 
"{{#a_object}}<h1>{{title}}</h1><p>{{description}}</p><ul>{{#a_list}}<li>{{label}}</li>{{/a_list}}</ul>{{/a_object}}";return
 mustache.to_html(template,view);
}

Outputs:
<h1></h1><p></p><ul></ul>
This is all related to my original question below that I realize is overly 
complicated.
Thank you,
/ Jeff  


      

Reply via email to