reactjs - 我们如何传入模板文字
问题描述
解决方案
利用dangerouslySetInnerHTML
<div dangerouslySetInnerHTML={{ __html: ${notificationData && notificationData.length} other <strong>open problems</strong> with this asset` }} />
推荐阅读
- firebase - 在 Vue.js 组件中从 Firebase 获取数据
- javascript - 在同步函数和 for 循环中获取 API
- dialogflow-es - Dialogflow Fulfillment 响应似乎不适用于丰富响应(基本卡)和 OutputContext 或后续事件
- python - 我应该何时使用 DateTime(timezone=True) 以及何时使用 TIMESTAMP(timezone=True)?
- python - 如何在不使用全局变量的情况下完成同样的事情?
- javascript - 单击时冻结页面
- python - 在北极图书馆存储和获取多个股票
- scala - scala - 交换列表中的前 2 个元素
- python-3.x - .pyw 文件的 shebang 行是什么?
- java - 关于凸包中最远点的问题(在java中)