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: > > The delimiters for haml (erb) collide with the delimiters for the > underscore templates... > > best way I've found is to change the underscore template settings to the > mustache delimiters {{ and }} > > from the underscore.js docs: > > _.templateSettings = { > interpolate : /\{\{(.+?)\}\}/g > }; > > > > On Thursday, August 16, 2012 10:31:31 AM UTC-7, Ritesh Nadhani wrote: >> >> So for my new project we are trying to use HAML/backbone.js/underscore.js >> templates. After reading the docs, I could figure out something like this: >> >> %script#album-row{ :type => 'text/template' } >> .album-row >> %a{ :href => '<%= href %>'} >> <%= name %> >> >> While templating, "name" is correctly interpolated but I cannot get >> "href" to work. >> >> Any thoughts? >> >> -- 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 haml@googlegroups.com. To unsubscribe from this group, send email to haml+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/haml?hl=en.