Closed bminer closed 7 years ago
+1
same for _.map()
-- at least from within Template helpers
What about just adding a branchLabel
keyword to Blade?
Usage:
- for(var i = 0; i < arr.length; i++)
branchLabel arr[i].id
p Item #{arr[i].id}: #{JSON.stringify(arr[i])}
The trick here is that every element in the array must have a unique identifier.
Or, for file includes (the main purpose of this issue):
- for(var i = 0; i < arr.length; i++)
branchLabel arr[i].id
- var item = arr[i]
include "child_template" exposing item
I wonder if this would work, too....
- for(var i = 0; i < arr.length; i++)
branchLabel i
- var item = arr[i]
include "child_template" exposing item
Hmm... interesting...
Hey everyone who is interested. I haven't forgotten about this issue. It's just that Meteor & Spark have been changing quite a bit lately, and I think that I would rather wait for everything to become a bit more finalized before investing much more time in it. Thanks for you patience!
Closing this issue. Dropping Blade + Meteor support for now. :(
Right now, the only way to ensure that Blade is properly generating branch labels is when using the
foreach
loop structure. That is, file includes within aforeach
loop work just fine.Regular for loops, while loops, etc. do not work as desired.