Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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 ?

like image 587
Manuel Leduc Avatar asked Nov 16 '25 22:11

Manuel Leduc


1 Answers

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">
like image 166
Michael Snoyman Avatar answered Nov 19 '25 13:11

Michael Snoyman