You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So there's a weirdness in can-stache and can-component that would be good to figure out.
This is easiest to understand with an example:
<outer><inner>{{HERE}}</inner></outer>
With leak scope, this should be something like:
[<outer> TEMPLATE,
<outer> VM,
<inner> TEMPLATE,
<inner> VM
]
In an ideal world, can-component could fashion this itself and do something like:
passedOuterScope.add( new Template({ ... }) ).add( new VM() )
But the problem is that only can-stache has to add the filename, inlinePartials and view.
I think the solution is to keep this information in two different types. For now, I'll call them:
TemplateFrame - Something that houses variables/partials/etc for a "call" of a template. I used Frame because it's like an ActivationFrame in the stack.
TemplateData - This houses static information for a template.
Ideally these should be renamed with how they work in can-view-scope. There's probably only the TemplateContext. But this should really be something like ScopeAndHelperValues
The text was updated successfully, but these errors were encountered:
So there's a weirdness in
can-stache
andcan-component
that would be good to figure out.This is easiest to understand with an example:
With leak scope, this should be something like:
In an ideal world,
can-component
could fashion this itself and do something like:But the problem is that only
can-stache
has to add thefilename
,inlinePartials
andview
.I think the solution is to keep this information in two different types. For now, I'll call them:
TemplateFrame
- Something that houses variables/partials/etc for a "call" of a template. I usedFrame
because it's like anActivationFrame
in the stack.TemplateData
- This houses static information for a template.can-component
would do:and
can-stache
would always do:Ideally these should be renamed with how they work in
can-view-scope
. There's probably only theTemplateContext
. But this should really be something likeScopeAndHelperValues
The text was updated successfully, but these errors were encountered: