handlebars.js - Mustache Handlebars 中的嵌套表达式(Triple-Stash 中的表达式)
问题描述
您如何在 Handlebars Triple-stash 中放置表达式?
我的.hbs
文件中有以下内容
{{{product.productdescription}}}
那么产品描述是:
<div>
<h1> {{product.producttitle}} </h1>
<p> This is a product </p>
<div>
当我只使用三括号时,它只是将字符串呈现productdescription
为 HTML,{{product.producttitle}}
而不是呈现,只是显示为文本。
解决方案
推荐阅读
- javascript - 节点:未定义回调
- window-server - 在 Windows 服务器上剪切的扩展文件属性
- swift - AVPlayerItem 值的 canPlayFastForward、canPlayFastReverse 属性是否快速变化?
- python - 如何将我的编译器从 python2 转换为 python3
- java - 我在 Heroku 上部署基于 Java 的应用程序时遇到问题
- jenkins-pipeline - 我们如何使用 Jenkins Pipeline 在 Mac 代理中使用 Chamber
- c# - Windows 中的动态端口范围是全部保留还是每个目标端口保留?
- android - Android TV RecognizerIntent 适用于模拟器(Studio Studio 模拟器)但不适用于 ADT-3
- javascript - 遍历 dom 元素并将每个元素附加到其他元素
- c - Ceedling 使用错误的启动文件