[英]jQuery templating Engine : Not able to render html output
My Templates are: 我的模板是:
<script id="tmplRiskInformation" type="text/x-jquery-tmpl"> <div class=""> {{tmpl(collection) "#tmplLimitsDeductible" }} </div> </script> <script id="tmplLimitsDeductible" type="text/x-jquery-tmpl"> <div> ${LimitsDeductible} </div> </script>
The output is html from database and not rendering to browser. 输出是来自数据库的html,而不是呈现给浏览器。 The value is a html table as
该值是一个html表,如
LimitsDeductible = "<table><tr><td>TEST TEST</td></tr></table>"
I have used the below but not getting the result as text not html. 我已经使用了以下内容,但未将结果显示为文本而不是html。
${html LimitsDeductible}
{{html ${LimitsDeductible} }}
Please find the output getting as 请找到输出为
The answer will be appreciated.. Thanks
答案将不胜感激..谢谢
Try: 尝试:
<script id="tmplLimitsDeductible" type="text/x-jquery-tmpl">
<div>
{{html LimitsDeductible}}
</div>
</script>
See here for an example: https://github.com/BorisMoore/jquery-tmpl/blob/master/demos/step-by-step/0_tmpl-read-only/2_html-tag-source.html 参见此处的示例: https : //github.com/BorisMoore/jquery-tmpl/blob/master/demos/step-by-step/0_tmpl-read-only/2_html-tag-source.html
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.