I create mustache templates with HAML without any problems.
My HAML looks something like this:
.template.shop .foreground .header .header-logo .shop-description .table-frame %a.close-button{:href=>"#"} Close %table %tr %td.shop-images %td.shop-details %p.popup-headline.fix-width {{addr_name}} %p {{addr_street}} {{addr_number}} %br/ {{addr_zip}} {{addr_city}} / {{
It works like a charm. It displays as HTML on the server, which I am extracting from the page using jQuery on the client. Then I take the HTML template and process it with a mustache.
Because of this, you sometimes need to be careful where the mustache tags appear . For the browser, they are just text, so they are not valid between the rows of the table, for example. In this case, put them in the HTML comments, as in my example.
You can also avoid the generated HTML / Mustache on the server. This was not possible in my case because I wanted to create the generated part of my HTML template to simplify the styling.
source share