-
Notifications
You must be signed in to change notification settings - Fork 89
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
Use transclude scope for inline node templates #81
Comments
Hi, I have player around with the node templates and the tree compilation, and I haven't found a way to get rid of the wrapper of the transcluded templates (either with a On the other hand, I could finally find a solution to use the transcluded scope in the node templates, obviously, because of the
You can check my changes in the link below and let me know your thoughts on this so I can create the PR for this. |
…iables from such scope can be used in the node template (with $parent)
That's interesting. I wouldn't want to advocate using |
Yes, the transcluded scope is transparently exposed (because the new scope prototypically inherits from that). And regarding the If we find a way to get rid of such wrapper then it would be great but so far this is the best I could do. |
Hi, do you think this feature could also be part of the v2? If so, I can submit the corresponding PR. |
I'd love to get this in v2, we'd just want to make sure we got appropriate tests added as well. |
I'd like to see what it would take to get rid of the need for wrapping transcluded node templates in a
script
tag so that folks can use functions/variables in the transcluded scope within their templates.E.g. this:
Instead of this:
Currently the former will generate a number of compilation errors.
See #70
The text was updated successfully, but these errors were encountered: