Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accessing parent template instances and data contexts by number is fragile #64

Open
mitar opened this issue Feb 7, 2015 · 0 comments
Open

Comments

@mitar
Copy link

mitar commented Feb 7, 2015

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant