我需要添加 html 元素表单助手。有办法吗?
模板:
<template name="Index">
<div class="title"> {{title}} </div>
</template>
JS
Template.Index.helpers({
title: function(){
var testvariable = "Hello <b>World</b>";
return testvariable;
}
})
注意:下面的方法可以正常工作。但就我而言,标题字符串是动态内容。
<div class="title"> Hello <b>{{title}}</b> </div>
var testvariable = "World";
最佳答案
关于javascript - 如何从助手返回 html 元素?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30996071/