I'm a big fan of jamesotron hamlbars
https://github.com/jamesotron/hamlbars
The most basic thing the gem provides is a helper method for
generating expressions that will later hold interpolated values. The
helper method also accepts blocks, and automatically generates
appropriate opening/closing tags in the template source.
The gem is focused on generating templates that can be consumed and
processed by Handlebars/EmberJS so they're not exactly
underscore-compatible, so that may make this a non-starter for you,
but its an elegant way to deal with with difficulty of generating
closing tags in a template language that eschews them.
On Mon, Oct 15, 2012 at 5:51 PM, Bryan Li <
b...@bry.li> wrote:
> This works great for getting the values off an variable. Would it work for
> if/else statements though? How do I translate the following?
>
> <% if (boolean) { %>
> <div>Blah blah</div>
> <% } %>
>
>
> On Monday, August 20, 2012 10:34:46 AM UTC-7, Les Nightingill wrote:
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Haml" group.
> To view this discussion on the web visit
>
https://groups.google.com/d/msg/haml/-/Ra7qHxN_k2cJ.
>
> To post to this group, send email to
ha...@googlegroups.com.
> To unsubscribe from this group, send email to
>
haml+uns...@googlegroups.com.
> For more options, visit this group at
>
http://groups.google.com/group/haml?hl=en.