Skip to content

Incorrect scope in transcluded repeater #1010

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

Closed
JosephSilber opened this issue Jul 5, 2015 · 3 comments
Closed

Incorrect scope in transcluded repeater #1010

JosephSilber opened this issue Jul 5, 2015 · 3 comments

Comments

@JosephSilber
Copy link

Using a repeater in trascluded content seems to set the scope to the current component, instead of the parent - as it is outside of the repeater:

http://jsfiddle.net/43LbnLpj/

@OEvgeny
Copy link

OEvgeny commented Jul 5, 2015

See 12.5 release notes - now trascluded component is the child of its host component. So, this will work: http://jsfiddle.net/43LbnLpj/1/

@JosephSilber JosephSilber changed the title Incorrect context in transcluded repeater Incorrect scope in transcluded repeater Jul 5, 2015
@JosephSilber
Copy link
Author

@OEvgeny I've actually read the release notes, but that didn't help me much.

Note that {{msg}}, together with any directives on the transcluded components, will still be compiled in the host's parent scope.

The host's parent scope, not the host parent scope.

Unless I'm misunderstanding it, the tab content is compiled the the scope of tabs' parent.

In my example, v-repeat's content should be compiled in the root scope, which is inner's parent.

@OEvgeny
Copy link

OEvgeny commented Jul 5, 2015

Ah, yes. Got it.

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