0

我正在使用经典的 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 美元!

{{.}}

如何将数组添加到我的模板?

4

0 回答 0