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

Nested partials is not working as expected #728

Closed
kratiahuja opened this issue Oct 30, 2017 · 1 comment · Fixed by #730
Closed

Nested partials is not working as expected #728

kratiahuja opened this issue Oct 30, 2017 · 1 comment · Fixed by #730

Comments

@kratiahuja
Copy link

kratiahuja commented Oct 30, 2017

Related issues:

emberjs/ember.js#15791

Steps to reproduce

The parent template context isn't being passed down to partials that are nested. It is only being passed down to the first partial that is being invoked

Example:

// main.hbs
{{#each model as |record index|}}
  {{partial 'my-partials/some-partials'}}
{{/each}}
// my-partials/some-partials.hbs
<p>record id: {{record.id}} </p>
{{partial 'my-partials/name'}}
// my-partials/name.hbs
<p> record name: {{record.name}}</p>

In the name.hbs partial, the record is undefined.

Expected result:

Rendered template should be:

record id: 1
record name: foo

Actual result

record id: 1
record name: 
@GavinJoyce
Copy link
Contributor

Fix here: #730

chancancode added a commit that referenced this issue Nov 1, 2017
Fix nested partials within a `{{#with}}` block (#728)
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

Successfully merging a pull request may close this issue.

2 participants