question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

FR: Handlebars.js templating

See original GitHub issue

Now there’s no way to output the loop index or keys using mustache. Use case:

{{#products}}
<input type="radio" id="{{productId}}" name="quickview" value="{{productId}}"
on='change:quickView_Carousel.goToSlide(index={{@index}})'>
<label for="{{productId}}">{{productName}}</lable>
{{/products}}

I’m sure there are many more use cases for having access to the loop index(for arrays) and keys(for objects)

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:12 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
dreamofabearcommented, Dec 20, 2018

We’re still planning to add this eventually, just haven’t gotten around to it yet.

0reactions
stale[bot]commented, Dec 22, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Handlebars.js
Handlebars compiles templates into JavaScript functions. This makes the template execution faster than most other template engines.
Read more >
How to use Handlebars.js for templating | Vahid Dejwakh
The Handlebars.js library is perfect for this. It takes less than 5 minutes to learn how to use this simple and efficient templating...
Read more >
Templating With Handlebars Cheatsheet - Codecademy
These expressions are placeholders for content to be inserted by our Handlebars.js code in our js document. When the compiled templated function is...
Read more >
Guide to Handlebars: Templating Engine for Node/JavaScript
In this article, we are going to take a look at how to use the Handlebars template engine with Node.js and Express.
Read more >
handlebars-lang/handlebars.js: Minimal templating on steroids.
js templates is a superset of Mustache templates. For basic syntax, check out the Mustache manpage. Once you have a template, use the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found