Closed emiliobool closed 10 years ago
is it possible to use nested helpers?
consider this case using @upperHelper inside linkHelper
{ title : 'Hello, world!', id : 'main', links: [ { name : 'Google', url : 'http://google.com/' }, { name : 'Facebook', url : 'http://facebook.com/' }, { name : 'Twitter', url : 'http://twitter.com/' } ], upperHelper : function (string) { return string.toUpperCase(); } }
<% linkHelper = (link) -> %> <li><a href="<%- link.url %>"><%- @upperHelper link.name %></a></li> <% end %> <% if @links?.length : %> <ul> <% for link in @links : %> <%- linkHelper link %> <% end %> </ul> <% else : %> <p>List is empty</p> <% end %>
not working for me, is there any workaround?
this is actually the same issue as https://github.com/baryshev/ect/issues/36 and that solution works fine
is it possible to use nested helpers?
consider this case using @upperHelper inside linkHelper
not working for me, is there any workaround?