Accessing parent template instances and data contexts by number is fragile
mitar opened this issue · 0 comments
mitar commented
Meteor provides only a way to access parent data contexts by level number. This is really fragile if you are moving templates around and adding more helpers in between. Or, sometimes you have to include the same template in multiple ways which have different number of parent contexts in between the one you want to access. To make code more reusable and less error prone I think ways to access parent template instances and data contexts where you can declare the intent and not levels is better.
I just made this pull request to address some of shortcomings and provide nice helpers. What do the other think about this? Any other patterns you are using?