我正在从事一个角项目,并让tippy.js运行良好( https://atomiks.github.io )。
问题是,我需要用一些JSON信息填充工具提示,这些JSON信息可以用角插值来放置,但是出现了以下错误:“无法绑定到‘tippy’,因为它不是‘div’的一个已知属性。”
<div data-tippy-content="{{top.description}}" data-tippy-placement="right" class="layout-tops-photos theme-tops-photos theme-hover js-tippy"></div>
有办法让它与插值一起工作吗?如果没有,还有别的办法吗?
发布于 2019-05-20 20:41:56
使用属性绑定语法
<div attr.data-tippy-content="{{top.description}}" data-tippy-placement="right" class="layout-tops-photos theme-tops-photos theme-hover js-tippy"></div>
https://stackoverflow.com/questions/56227875
复制相似问题