Skip to content

The paramAttributes values are not interpolated #138

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
bpierre opened this issue Feb 26, 2014 · 4 comments
Closed

The paramAttributes values are not interpolated #138

bpierre opened this issue Feb 26, 2014 · 4 comments

Comments

@bpierre
Copy link

bpierre commented Feb 26, 2014

See http://jsfiddle.net/aB577/

@yyx990803
Copy link
Member

paramAttributes is intended for simple inline data only, so the attribute value will be interpreted as raw values instead of a binding. A child component can already access parent data directly in the template, and to actually share data you should use v-with.

@bpierre
Copy link
Author

bpierre commented Feb 26, 2014

I see. I built a better example, just to see if I missed an obvious solution for my case.

Basically, I have a component, and I’d like to bind it to a data property in the parent VM. The parent’s VM already has a property which is directly on data, so I cannot directly use v-with.

Ideally, I’d like to bind the data.value of my component to the data.appValue of my app, the same way I can bind an input’s value to a data property with v-model.

I like the last one, because the data structures are kept separated, like with a <input v-model="appValue">.

What do you think?

@yyx990803
Copy link
Member

Thanks for the detailed examples! That totally make sense. I think something like your v-bind could be indeed useful. It also makes me think about some lock mechanism to prevent values from circular triggering.

@yyx990803
Copy link
Member

1a05dea

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