【发布时间】:2016-05-12 13:23:05
【问题描述】:
我在我的应用程序中使用了翡翠模板引擎,并想删除 jquery 来检查性能。在这个例子中无法弄清楚如何用纯 JS 来做。
而不是像这样使用jquery:
var items = ['it1', 'it2', 'it3'];
var tmpl = require('views/list');
var html = tmpl({ items: App.items });
$('body').append(html);
模板如下所示:
ul#itemsLists
each item in items
li= item
【问题讨论】:
-
忘记添加我在早午餐工作
标签: javascript jquery performance templates pug