1

我正在使用 underscopre ( grunt-contrib-jst) JST 模板来呈现 VIEW。

但是,我处于需要将可重用的 html 作为模板的部分内容的情况。

我可以制作一个单独的 .tmpl 并将其包含在父级 .tmpl 中吗?

我的代码看起来像

var tmpl = my.namespace['template/hello.tmpl'];
$("#content").html(tmpl({  
   data:data
}));

//where as I need to spearate templates inside hello.tmpl
4

0 回答 0