我正在使用经典的asp Mustache(https://github.com/20twoes/classic-asp-mustache)。
一切都很清楚,但我不明白如何用这样的小胡子填充列表:
从示例开始:
Set M = new Mustache
Set dict=Server.CreateObject("Scripting.Dictionary")
Set dictList=Server.CreateObject("Scripting.Dictionary")
dim output, template
template = _
"Hello {{name}} " & _
"You have just won ${{value}}! <br>" & _
"{{#thelist}} " & _
"{{.}} " &_
"{{/thelist}}"
dict.Add "name", "Chris"
dict.Add "value", 10000
dictList.add "one","blue"
dictList.add "two","white"
dictList.add "three","green"
dict.Add "thelist", dictList
output = M.render(template, dict)
Response.Write output
但结果不正确
你好克里斯你刚赢了10000美元!
{{。}}
如何在模板中添加数组?