canjs / can-component

Custom elements and widgets
https://canjs.com/doc/can-component.html
MIT License
8 stars 8 forks source link

content tag broken by rendering another component #279

Closed phillipskevin closed 6 years ago

phillipskevin commented 6 years ago

Currently, the <content /> tag is broken for components that render other components before rendering the <content/>, like:

{{! app.stache }}
<main-component>
  MAIN
</main-component>

{{! main-component.stache}}
<my-other-component>
  OTHER
</my-other-component>

<content />

The <content/> there will render OTHER because a new templateContext was not created for each component.