我使用dust.js(经过大量搜索缺乏良好的文档)。最后,我能够动态地创建一个超链接。现在我想给动态生成的超链接提供一个onclick功能。 function createLink(){
// register the template loading method with dust now
var compiled = dust.compile("Hello <a hre
新来的Nunjucks和有类似的问题here,但我无法让我的代码工作。我试图循环14个物品的Nunjucks循环中的前5个物品。到目前为止,我发现range function应该能够做到这一点,但不能得到正确的语法。这似乎是我指向索引不正确。 我的代码获得所有14个项目是: {% for images in index %}
<div class="spacer col-md-2 co