Closed phillipskevin closed 5 years ago
This works:
{{< foo }} This is foo {{/ foo }} <p>{{ scope.templateContext.partials.foo() }}</p>
...and this works:
{{< foo }} This is foo {{/ foo }} {{ let bar = scope.templateContext.partials.foo }} <p>{{ bar "baz" }}</p>
...but this doesn't work:
{{< foo }} This is foo {{/ foo }} {{ let bar = scope.templateContext.partials.foo }} <p>{{ bar() }}</p>
In this case, the partial is called, but not rendered. I'm not sure why.
Probably because the render function is inside an observable.
https://github.com/canjs/can-stache/blob/master/expressions/call.js#L75
This works:
...and this works:
...but this doesn't work:
In this case, the partial is called, but not rendered. I'm not sure why.