简体   繁体   English

使用带有yesod的ember.js

[英]Using ember.js with yesod

As seen on http://emberjs.com/guides/templates/binding-element-attributes/ ember templates system requires to generate pseudo-html which looks like : http://emberjs.com/guides/templates/binding-element-attributes/上所见,ember模板系统需要生成伪html,如下所示:

<div id="logo">
  <img {{bind-attr src=logoUrl}} alt="Logo">
</div>

But I can't find a way to makes Hamlet compliant with this kind of non standard output. 但我找不到让哈姆雷特符合这种非标准输出的方法。 Do I need to escape everything when ember's elements binding is needed or is their another solution ? 当需要使用ember的元素绑定或者是另一种解决方案时,我是否需要逃避一切?

I've never used ember.js, but I believe you'll need to do some kind of escaping. 我从未使用过ember.js,但我相信你需要做一些逃避。 I believe your example could be expressed in Hamlet as: 我相信你的例子可以用哈姆雷特表达为:

<div #logo>
    \<img {{bind-attr src=logoUrl}} alt="Logo">

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM