Skip to content

problem with variables like : x2 #961

Closed
@zezont4

Description

@zezont4

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: ''
    }
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions