Open
Description
Consider the following two uses of a custom helper that needs to know information about the evaluation context in which it's been run:
{{#each robots}}
{{helperThatNeedsToKnowWhichRobot this}}
{{/each}}
{{#with robots.husky}}
{{helperThatNeedsToKnowWhichRobot this}}
{{/with}}
In the first case, my helper receives an options object with the following useful data fields:
data: {
root: [Object],
_parent: [Object],
key: 'husky',
index: 2,
first: false,
last: false
},
But the second example gives me nothing to work with:
data: { root: [Object] }
How can I implement the described helper which will also work in a with
evaluation context?