Skip to content

problem with variables like : x2 #961

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
zezont4 opened this issue Jun 20, 2015 · 1 comment
Closed

problem with variables like : x2 #961

zezont4 opened this issue Jun 20, 2015 · 1 comment

Comments

@zezont4
Copy link

zezont4 commented Jun 20, 2015

Is this a bug ?

In this example the Props (x) and data variable (x) are two-way binding
Also x1

(x) is working but (x1) is not , because of the number "1"

Try it in JsFiddle

HTML

<script type="text/x-template" id="my-component-template">
    <input type="text" name="name" v-model="value" />
    props : {{$data | json }}
</script>
<div id="demo">
    <input type="text" v-model="x" />
    <my-component name="x" value="{{@ x}}"></my-component>
    <hr />
    <input type="text" v-model="x1" />
    <my-component name="x1" value="{{@ x1}}"></my-component>
    <hr />
    {{ $data | json }}
</div>

JS

Vue.component('my-component', {
        template: '#my-component-template',
        props: ['name', 'value'],
    });

new Vue({
    el: '#demo',
    data: {
        x: '',
        x1: ''
    }
});
@yyx990803
Copy link
Member

Thanks, fixed!

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