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

Existing content is not replaced when node is yielded #51

Open
djgrant opened this issue Jul 7, 2015 · 1 comment
Open

Existing content is not replaced when node is yielded #51

djgrant opened this issue Jul 7, 2015 · 1 comment

Comments

@djgrant
Copy link

djgrant commented Jul 7, 2015

Take this example where a child component yields it's #header to the header in the parent component:

// Child component
behaviors: {
  '#header': {
    '$yield': '#title'
  }
},
tree: `<node id="header"><h1>Title</h1></node>`
// Parent component
tree: `
  <user:child>
    <node id='header">
      <h1>Different title</h1>
  </node>
</user:child>`

The content from the child #header is not replaced by the content from the parent. Instead both <h1>s are rendered.

Linguistically, at least, it would make better sense if when a node is directed to yield it completely hands over responsibility for what is rendered inside to the node it is yielding to.

@arkadyp
Copy link

arkadyp commented Jul 7, 2015

@djgrant Thanks for bringing this to our attention. I'll look into this today.

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

2 participants