[英]how to render html text with {{action}} as ember html inside a template?
Hi I have computed property that returns an html link with an ember action like this:嗨,我有一个计算属性,它返回一个 html 链接,其中包含这样的 ember 操作:
externalHtmlLink:外部HTML链接:
<a {{action 'runService' 15001}} href="#">Click Here</a>
but if I render this inside the template like this:但是如果我像这样在模板中渲染它:
{{{externalHtmlLink}}}
it renders the Action part as text and not as an Ember Html, and the action is never triggered.它将 Action 部分呈现为文本,而不是 Ember Html,并且永远不会触发该操作。 How should I render the link so the action is rendered by Ember?
我应该如何呈现链接,以便 Ember 呈现动作?
does rendering your component with only two sets of {}
work?仅使用两组
{}
渲染您的组件是否有效?
eg:例如:
{{externalHtmlLink}}
It's been a good number of years since this syntax自从这种语法以来已经有很多年了
any chance I can encourage you to upgrade?我有机会鼓励你升级吗?
There is a guide here: https://emberjs.com/editions/octane/这里有一个指南: https://emberjs.com/editions/octane/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.