javascript - How do I write this pug function in handlebars? -


can tell me how can write following pug code in handlebars code?

ul       product in products           li #{product.product}           li #{product.price} 

i found following code, have populate 2 points per iteration. don't know how implement that.

handlebars.registerhelper('list', function(n, block) {     var accum = '';     for(n in block)         accum1 += block.fn(n);     return accum; }); 

thanks.

try this

<ul> {{#each products}}    <li>{{product}}</li>    <li>{{price}}</li> {{/each}} </ul> 

Comments

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -