Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Add an index to #each loop
* Add an index to each loop
UI.registerHelper('indexedArray', function(context, options) {
if (context) {
return, index) {
item._index = index + 1;
return item;

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.