Loop Variables #9332
dabernathy89
started this conversation in
Ideas
Loop Variables
#9332
Replies: 1 comment 2 replies
-
I think it could be easily achieved by some util functions which could save runtime cost and bundle size for Vue general usage. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Laravel's Blade template system has a feature called the "loop variable". This is a variable available inside a
foreach
loop that provides quick access to commonly needed information about the current item in the loop, such as whether it is thefirst
orlast
item, whether it's aneven
or anodd
"row", etc. It would be really neat if we could write a loop like this:This is more concise than the current alternative:
Beta Was this translation helpful? Give feedback.
All reactions