我是一个运行 CouchDB 1.0.1 的 couchdb 新手。
我有一个非常基本的问题。我无法让 Mustache Sections 在列表中呈现。这是我的列表,其中包含来自示例的硬编码数据。
function(head, req) {
start({
"headers": {
"Content-Type": "text/html"
}
});
var mustache = require("lib/mustache");
var view = {name: "Joe's shopping card",items: ["bananas", "apples"]};
var template = "{{name}}: <ul> {{#items}}<li>{{.}}</li>{{/items}} </ul>";
return mustache.to_html(template,view);
输出:
Joe's shopping card: <ul> <li></li><li></li></ul>
请帮忙!!!
谢谢你,/杰夫