简体   繁体   中英

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 :

<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 ?

I've never used ember.js, but I believe you'll need to do some kind of escaping. I believe your example could be expressed in Hamlet as:

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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