Quantcast
Channel: JavaScriptMVC Forum
Viewing all articles
Browse latest Browse all 3491

[ejs to mustache converting] Mustache Experts Needed!

$
0
0
I'm working on the following code . It go through a can.List or an Array.
  1. <% people.each (function ( person ) { %> 
  2. <li <%= (el)-> el.data('personInfo', person ) %>>
  3. <h2><%= person.attr('name') %> </h2>
  4. <p><%= person.attr('myStory') %></p>
  5. <hr>
  6. </li>
  7. <%}) %>
 In ejs I can refer to each person while iterating people, But How can I do it in mustache? 
  1. {{#people }} 
  2. <li {{ (el)-> el.data('personInfo', ???? ) }}>
  3. <h2>{{name}} </h2>
  4. <p>{{myStory}}</p>
  5. <hr>
  6. </li>
  7. {{/people}}

I have a fiddle here. 

Please help me, thank you!!

Viewing all articles
Browse latest Browse all 3491

Trending Articles